Negative infinity is a special number which comes up when a negative number is divided by zero.
- do-while loops
Variable typing is used to assign a number to a variable and the same variable can be assigned to a string.
i = 10; i = "string";
This is called variable typing.
The parseInt() function is used to convert numbers between different bases. parseInt() takes the string to be converted as its first parameter, and the second parameter is the base of the given string.
In order to convert 4F (of base 16) to integer, the code used will be –
parseInt ("4F", 16);
25. Explain the difference between “==” and “===”?
“==” checks only for equality in value whereas “===” is a stricter equality test and returns false if either the value or the type of the two variables are different.
26. What would be the result of 3+2+”7″?
Since 3 and 2 are integers, they will be added numerically. And since 7 is a string, its concatenation will be done. So the result would be 57.
27. How can we append a value to an array?
Array value can be appended by arr[arr.length] = value;
The NULL value is used to represent no value or no object. It implies no object or null string, no valid boolean value, no number and no array object.
29. What is the function of delete operator?
The functionality of delete operator is used to delete all variables and objects in a program but it cannot delete variables declared with VAR keyword.
Undefined value means the
- Variable used in the code doesn’t exist
- Variable is not assigned to any value
- Property doesn’t exist