You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>In computer programming, a comment is a programmer-readable explanation or annotation in the source code of a computer program. They are added with the purpose of making the source code easier for humans to understand, and are generally ignored by compilers and interpreters.[1][2] The syntax of comments in various programming languages varies considerably.</p>
68
+
<code>//Single Line Comment</code>
69
+
<p></p>
70
+
<code>/*
71
+
Mutiline <br>comment
72
+
*/</code>
63
73
74
+
<h4class="fs-4 mt-4">JavaScript User Input</h4>
75
+
<pclass="mb-0">We can use prompt function for javacript user input</p>
* Variables defined with const cannot be Redeclared
70
+
* Variables defined with const cannot be Reassigned
71
+
* Variables defined with const have Block Scope
72
+
<b>Always declare a variable with const when you know that the value should not be changed.</b>
73
+
</pre>
74
+
75
+
<b>Example:</b>
76
+
<pclass="mb-1">Correct Example:</p>
77
+
<code>
78
+
const PI = 3.14159265359
79
+
</code>
80
+
81
+
<pclass="mb-1">Incorrect Example:</p>
82
+
<code>
83
+
const PI = 3.141592653589793;<br>
84
+
PI = 3.14; // This will give an error <br>
85
+
PI = PI + 10; // This will also give an error <br>
86
+
</code>
87
+
<pclass="m-0 mt-3"><b>Keywords:</b></p>
88
+
<p>In programming, a keyword is a word with a specific meaning and purpose that is reserved by a programming language. Keywords are used in the syntax of a program to define its structure and flow, and to specify the operations it should perform. They are also known as reserved words.</p>
0 commit comments