Javascript Statements

JS Statements in Hindi – Javascript Statements in Hindi

JavaScript

JS Statements in HindiJavaScript Statements in Hindi:- Is JS Statements Ka Istemal Line of Code Ko Likhne Ke Liye Hota Hain. Waise Statements Ko A to Z Understand Karne Wale Hai |

Also Read :- JavaScript Introduction

Javascript Statements in Hindi

JavaScript programming language me code ki Ek Puri line Statement kahlati hai. Or Statement se hi milkar Pura program banta hai.

Variable create Karte hai And Usme value add Karte Hai Vo Bhi statement hai. Document.write(“hello world”); ye function Jo output deta hai. Ye Bhi ek statement hai.

Code me Har Ek Line Separate Line statement kahlati hai. JavaScript Statement me Values, Operators, Expressions, Keywords Or comments Etc Hote Hai.

Example:

<script>
var x, y, z;  // Variable Declaration Statement 1
x = 5;        // Value Assign Statement 2
y = 6;        // Value Assign Statement 3
z = x + y;    // Assign the sum x and y to z Statement 4
document.write(z);
</script>

Output:

11

Isme aap dekh sakte hai. Ye ek simple javascript program hai. Jo ki sum ki Calculation karta hai.

  1. Isme First option 3 variable x,y,z declare Karta hai.
  2. Isme x ki value assigns ki Gayi hai.
  3. Isme y ki value assign ki Gayi hai.
  4. Isme sum kar diya gaya hai. z ki value me x aur y add kiya gaya hai.
  5. document.write() function se z ki value display karayi gayi hai.

Also Read :- JS Output

Isme ye sabhi javascript statement hai. Jo ki Har Ek line me alag alag Statements hai. Aur Har Ek line apna kaam kar rhi hai. isliye isme Har Ek line ek statement hai.

Har Ek Line statement ke baad me semicolon (;) lagana bahut jaruri hai.

In One Line Statement

Agar Har Ek Line statement ko ek line me likhna chahe to likh sakte hai. Lekin statement ke end me semicolon (;) laga hona chahiye.

<script>
var x, y, z;  x = 5; y = 6; z = x + y;    
document.write(z);
</script>

Javascript Line length In Hindi

Jyadatar programmer jab code ko likhte hai. Or code Jyada Bada Ho Jata Hai. To usme break le lete hai.

JavaScript Mai Ek Line Statement Mai 80 Character Se Jyada Aap Nhi Likh Nhi Sakte Hai |

Example:

<script>
document.getElementById("demo").innerHTML =
"Text Best!";
</script>

Aap code me dekh sakte hai. Is prakar se likhte hai. Jaha pe Operator hota hai. Vaha se Break liya jata hai.

Javascript Code Blocks

Jab ham javascript me kai Statement ko Curly brackets {} ke andar likhte hai. To ye Code block kahlata hai. Iski Jyadatar Jarurat function me hoti hai.

<script>
function msFunction() {
  document.getElementById("demo1").innerHTML = "Hello MS Programmer!";
}

Aapne Kiya Learn Kiya ?

Is Article Mai Aapne JS Statements Ke Bare Mai Learn Kiya Hai Or Abhi Tak Keval Basic Par Focus Kiya Aage Ki Post Mai Ham JS Syntax 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 *