- How to write a comment in JavaScript?
- What does the isNaN() function?
- What is the output of “10”+20+30 in JavaScript?
- ctrl+/
- whether a value is NaN (not- a -number) when converted to a number
- 102030
-
Single-line comment: Use two forward slashes (//) before the comment. Anything written after these slashes on the same line will be considered a comment and will not be executed as a code.
-
Multi-line comment: Enclose the comment within /* and */. Anything written between these symbols will be considered a comment and will not be executed as a code.
The isNaN()
function in JavaScript stands for “is Not a Number”. It is used to determine whether a value is a NaN value or not. This function returns true if the value passed to it is NaN, false otherwise.
The output of "10" + 20 + 30
in JavaScript is "102030"
.
1 .ctrl+/
2. To determine num is value or not
3. 102030
- //
- (not- a -number) when converted to a number, this function returns true if the value passed to it is NaN, false otherwise.
- 102030
- //
- NaN (not-a-number)
- The output of “10” + 20 + 30 in JavaScript is “102030”
1.Ans:- ctrl+/
2.Ans:- NaN Function is used to check whether a given value is an illegal number or not.
syntax:- isNaN ( value )
3.Ans:- output:-102030
1.By making using of // symbol
2.isNaN() checks whether input is number or not
3.1050
1.//
2.not and number
3.1050
1.Using forward slash( //) or using shortcut ctrl+/ or shift+Alt+a
2.it will giving result as true or false ,the value is a number ,result is false else true
3.102030 => + symbol concat the numbers because one of the given value is string
done