Iterations

Iterations

Iterations Wa maxey Iterations ? Iterations wa loop ama wareeg, waxaana uu naga caawiya inaan so saarno macluumaad tiro badan, si nadaamsan walibo la fahmi karo. Types of loops || Noocyada loops ka Waxaa jiro sedex nooc oo loop ah waxa eyna kala yihin:   Dhamaantod isku shaqo ayey qabtaan waxa kaliya eyku kala duwan […]

Objects

javaScript Objects

Objects Wa maxey Objects ? javaScript objects wa data structure ama qaab data keydin, waxa eyna u keydisa data/macluumaadka qaab key to value, yacni waxa ey macmuulaadka ku keydisaa key. Horey waxaan uso baraney Arrays waxa ey tahay iyo qaabka ey u keydiso macmluumaadka, Objects waxa ey shabahdaa Arrays, lkn waxa ey ooga duwan tahay […]

Arrays

javaScript Arrays

Arrays Wa maxey Arrays ? array wa inaad hal (1) variable ku keydiso macluumaad kale duwan. Macluumaadkaas waxa u noqon karaa kuwa isku data-type ah sidokale wa ey kala duwanaan karaan.   Array Syntax const variableName = new Array(“data1″, data2, data3….);   Advantages of Array / Faaidooyinka Array 24 data-type keedu wa Number, sidokale “Ahmed” […]

Functions

javaScript Functions

Functions Wa maxey Functions ? function wa qeeb yar oo code ah, code kas oo aad isticmaali karto markasto oo aad u baahato. Code yar waxaan ula jeeda qeeb kamid ah Program_kaga.   function syntax function funcName(){ // function body… }   Faaidoyinka Functions? in file kaaga javaScript aadan ku qorin code isku nooc ah. inaad halmar qeexdo/define […]

Strict Mode

Strict mode javaScript

Strict Mode Wa maxey Strict mode ? wa mode ama xaalad ku suura galineyso inaad qorto code ama program secure ah yacni adag. Si aad u active gareyso wa inaad qeebta ogu koreyso ee file ka javaScript aad ku qortaa “use strict” oo ah strict mode isticmaal. Tusaale “use strict”; //Dhamaan code ka file kan ku […]

Ternary Operator

Ternary Operator

Ternary Operator Wa maxey Ternary Operator ? Ternary Operator ama Conditional wa qaab kale oo hubin/check loo sameeyo.  Horey waxaan uso baraney if statement oo aan isticmaalney marar badan oon hubin sameeney, midaan iyadane wa lamid waxa ey ooga duwan tahay wa hab qoraalka.   Syntax conditon ? “Hadii condition TRUE noqdo” : “Hadii condition FALSE […]

Statements and Expressions

Statements and Expressions

const age = 18; if(age > 15){ // Statements const result = “Waxaad tahay qaan-gaar”; // Expressions } Tusaalahan kore waxaa isku dhex jiro weydiimo iyo natiijo soo saarid. if(age > 15) {} intaan wa Statement, hadii condition kan uu true noqdo waxan ku keydin doona qoraalkan “Waxaa tahay qaan-gaar” variable ka natiijo madaama variable kan uu qoraal so […]

Switch Statement

Switch Statement

switch(variable){ case 1: // action, hadii case 1 true noqdo break; case 2: // action, hadii case 2 true noqdo break; default: // action, hadii dhamaan cases ka false noqdo }   Si aan iskula fahano sida ey u shaqeyso Switch Statement aan isla aragno tusaalahan hoose. kawaran hadii aad shaqeyso Sabti ilaa Qamiis ama aad […]

Boolean Logic

Boolean Logic

Boolean Logic Wa maxey Boolean Logic? wa qeyb kamid ah computer programming ka waxeyna so saaraan natiijo maya/false ama haa/true. Dhamaan luuqada programming ka wa ey ka mideysan yihiin is ticmaalka Boolean Logic. Boolean logics wa ey badan yihin waxa kamid ah ka-ween >, ka-yar < , ama ||, iyo &&, maya !, ka-ween mise […]

Equality Operators

Equality Operators (== vs ===)

Equality Operators (== vs ===) Equality Operators (== vs ===)? Waxaa jiro labo is-barbar dhig oo la isticmaalo markii aad javaScript is-barbar dhig sameeneysid waana == (double) equal operator iyo === (triple) equal operator. Equality Operators (== vs ===), labadu waxa ey so saaran boolean result sida true ama false. Double (==) equality, waxa ey […]