Wa maxey Var Let and Const ? waxa jiro sedex qaab oo aad u qeexi karto javaScript variables, waana Var Let and Const, sadexduba waxey ka turjumayan sida variable ka loola tacaamulayo.
Hadii variable kaaga aad ku qeexdo const hadhow variable kas macluumaadkisa ma badali doontid. const inta badan waxa lo isticmaala variables ka aadna badali doonin macluumadka kujiro.
Const micnaheedu waxa weeyo constant oo laga wado aana is badaleynin const waxa javaScript laguso darey 2015, yacni 2015 version_ki laso daayey bey la socotey.
Halmid wa inad ogaataa, variable aana wax macluumaad ah eyna ku jirin inad iska qeexdo adigoo isticmaalayo const javaScript ka yeeli meyso.
const name; // will not work
Hadii variable kaaga aad ku qeexdo Let gadaal dambo waad ka badali kartaa, sidokale wa aad qeexi karta variable eber ah kadib gadaal ayad wax oga shuban kartaa.
let name; // will work
name = "Ahmed";
let waxa javaScript laguso darey 2015.
Var waxey lamid tahay let, lkn waxa jiro waxyaabo ey ooga duwan tahay let, insha Allah waxan gadaal ka baran doonaa scope , hoisting iyo strict mode marki qeebtas lagaaro ayan arki doona kala duwanaanta let iyo var.
javaScript version ki ogu horeyey ayey la socotey var.