data types

Data Type

Wa maxey Data Type ? data-types waxa weyo nooca macluumaadka uu noqonayo. Sida caadiga ah qoraalada, tirada, iyo santiyaasha isku mid ma ahan, Sax? waxyaabaha ey ku kala duwan yihin waxa weeyo data-type kooda.

Tusaale: ‘ahmed’ qoraalkan data-type kisa wa String, 123 data-type kisu wa Number, 2.5 data-type kedu wa Float, false ama true data-type kedu wa Boolean.

javaScript markad qexeysid variable uma baahnid inaad sheegto data-type kiisa, wixi variable kas aad ku shubto ayey javaScript siineysa data-type kii ku haboona.

Tusaale

qeebtan hoose javaScript waxey data-type keda ka dhigi doontaa String, waayo qoraal ayaan ku shubney variable message.

				
					let message = "Hello World";
				
			

 

Xitaa hadii aad badasho macluumaadka ku jiro variable message javaScript waxey fiirineysa macluumaadka aad ku shubtey kadib waxey siineysa data-type ku haboon macluumaadkas.

Markii aad badasho macluumaad ku jirey variable waxa jiro waxyaabo dhaco isla waqtigas waxaana inoso socdo cashar aan ooga hadli doono insha Allah lesson:9

Tusaale:

variable ka message Data Type kisa wuxu noqon doona Number.

				
					let message = 24;
				
			

 

Sidee ku ogaan kartaa variable data-type kiisa ? waxa jiro method ku ogolaanayo inad ogaato variable data-type kiisa. typeof().

console.log() wa method kuusoo daabacayo macluumaadka aad rabto.

				
					console.log(typeof(message)) // Number
				
			
Share