What is the difference between undefined value and null value?

Undefined means a variable has been declared but has not yet been assigned a value. On the other hand, null is an assignment value. It can be assigned to a variable as a representation of no value.Also, undefined and null are two distinct types: undefined is a type itself (undefined) while null is an object. … Read more

What does undefined value mean in javascript?

Undefined value means the variable used in the code doesnt exist or is not assigned any value or the property doesnt exist. In JavaScript, undefined is a primitive value that is automatically assigned to variables that have been declared but not initialized with a value. It indicates that a variable has been declared but has … Read more

What does javascript null mean?

The null value is a unique value representing no value or no object. It implies no object,or null string,no valid boolean value,no number and no array object. In JavaScript, null is a special value that represents the intentional absence of any object value. It’s a primitive value. When a variable is assigned null, it means … Read more

How to comment javascript code?

Use // for line comments and /* some code here */ for block comments Name the numeric constants representing max,min values Number.MAX_VALUE Number.MIN_VALUE In JavaScript, you can comment code in two main ways: Single-line comments: These are created using two forward slashes //. Anything written after // on the same line is considered a comment … Read more

How to hide javascript code from old browsers that dont run it?

Use the below specified style of comments <script language=javascript> <!–javascript code goes here–> Or Use the <NOSCRIPT>some html code </NOSCRIPT> tags and code the display html statements between these and this will appear on the page if the browser does not support javascript. To hide JavaScript code from old browsers that don’t run it, you … Read more