4. What is the use of isNaN function?
isNan function returns true if the argument is not a number otherwise it is false.
6. What is negative infinity?
Breaking within a string statement can be done by the use of a backslash, ‘\’, at the end of the first line
document.write("This is \a program");
var x=1, y=2, z= x+y;
The above code is perfectly fine, though not advisable as it hampers debugging.
9. What are undeclared and undefined variables?
Undeclared variables are those that do not exist in a program and are not declared. If the program tries to read the value of an undeclared variable, then a runtime error is encountered.
Undefined variables are those that are declared in the program but have not been given any value. If the program tries to read the value of an undefined variable, an undefined value is returned.
10. Write the code for adding new elements dynamically?