Variables in Hindi in JavaScript

let const var – Javascript Variable in Hindi

JavaScript

Javascript Variables in Hindi – JS Variables jab create kiya jata hai tab interpreter dauvara value ko store karne ke liye memory location assign ki jati hai |

Javascript Variable in Hindi article me Javascript variable ki puri jankari di gayi hai. Javascript variable kya hai, Javascript variable ka use kya hai, Javascript variable kaise use karte hai. Ye sab ham is article me janege. To chaliye jante hai.

Also Read – JavaScript Introduction          

Javascript Variable in Hindi

Javascript variable ka use Data ko store karne ke liye kiya jata hai. Isake dwara name store, Price, Shopping Cart, Massage aadi sab prakar ki information Data ko Store kiya jata hai.

Javascript hame Three Types ke Data ko store karne ki anumati deta hai.

Numbers– 123, 10.5 etc

Boolean– True, False

String– Text I am vishal etc

Vaise to sabhi Programming Language me Variable Create, Declaration karne ka way same hota hai. Lekin kai language me Different way se Integer Value, Float point value ko hold kiya jata hai. Lekin Javascript me Integer Value, Float point value ko same way me hold kar sakte hai.

Javascript Variable syntax

Ab ham Variable ko create karne ka syntax jante hai. ki kaise variable create kiya jata hai.

var varname = Value;
var name = "Danish ";

Kisi variable ko Create var keyword se kiya jata hai.

Isake baad ham variable ka naam create karte hai. Jo bhi naam hame dena ho. Variable ke naam ko create karne ke kuchh Rules hai Jinhe ham jaan lete hai

Rules of Creating variable name in Hindi

  1. Variable ka naam $Sign ya phir letter, Underscore se suru hona chahiye.
  2. Variable ke naam me Numbers (123456789) etc Use kar sakte hai.
  3. Javascript ek case sinsative Language hai. Isliye Boy aur boy alag alag naam mane jayege.

Variable Keywords in JS In Hindi

JavaScript me Variable Ko Create Karne Ke Liye 3 Keywords Ka Istemal Hota Hai |

  • var
  • let
  • const

Also Read – JS Statements

Aap upper Dekh Sakte Hai Ki Maine 3 Variables Keywords Ko Show Kiya Hai. Inke Bare me Ham Ek Ek Karke Niche Janne Wale Hai |

How to create Javascript variable in Hindi

Var Se Create Kiye Gaye Viriable Ko Ham Pure Program Me Kahi Bhi Call Kar Sakte Hai. Lekin Jab Se Modern JavaScript Aayi Hai Jyadatar Programmer Ne Var Ka Istemal Karna Kam Kar Diya Hai |

Javascript variable ko create karne ka syntax kya hota hai. Ye hamne pahle hi uper bata rakha hai. Ab ham javascript ke variable ko create karege.

Example:

var x = 5;
var name = "Danish";
var _flo = 3.5;
document.write(x , name , _flo)

Output:

5Danish3.5

Ye Aap Dekh Sakte hai. Ye Hamne ek x number and name String And _flo Float variable create kiya hai. Jisme Kuchh data ko hold kiya jai. Number variable ko isi tarah se create kiya jata hai. Isase ham Calculation like- Add, Subtract, Multiply etc Kaphi asani se kar sakte hai. Jo mai neeche karke dikhata hoo.

const Keyword Ka Istemal Jab Kiya Jata Hai Jaha Par Hame Koi Variable Ki Value Ko Change Na Karna Ho Jaise const py = 3.14 Hai , Ise Ham Change Nhi Kar Sakte Hai |

Example:

const py = 3.14;
document.write(py)

Output:

3.14

Dhiyan Rahe const Keyword Wahi Par Istemal karna Hai Jaha Par Hame Value Ko Change Na Karna Pade |

let keywords Ka Istemal Ham Keval Block Ke Under Kar Sakte Hai Or let Ka Scope Bhi Block Ke Under Tak Hi Rahta Hai |

Example:

{
  let x = "Danish"
  document.write(x)
}

{
  let x = "Rahul"
  document.write(x)
}

Hamne 2 Block Create Kiye Hai 2 Dono Blocks Me let x Ka Istemal Kiya Hai. And Dono Ke Let x Variable Ko Alag Alag String Provide Ki hai To Aap Niche Ab Output ko Check Kar Sakte Hai |

Also Read – JS Comments

Output:

Danish
Rahul

Aapne Kiya Learn Kiya ?

Is Article Mai Aapne Js Variables in Hindi Ke Bare Mai Learn Kiya Hai Or Abhi Tak Keval Basic Par Focus Kiya Aage Ki Post Mai Ham JavaScript Data Types Ke Bare Mai Read Karne Wale Hai |

Yadi Aapne  HTML Full Course  And CSS Full Course And Python Full Course And PHP Full Course Nhi Read Kiya Hai To Aap Vah Bhi Read Kar Sakte Hai |

Leave a Reply

Your email address will not be published. Required fields are marked *