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.
22. 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
The pop() method is similar as the shift() method but the difference is that the Shift method works at the start of the array. Also the pop() method take the last element off of the given array and returns it. The array on which is called is then altered.
var cloths = [“Shirt”, “Pant”, “TShirt”];
//Now cloth becomes Shirt,Pant
25. What is break and continue statements?
Break statement exits from the current loop.
Continue statement continues with next statement of the loop.
26. What is the use of type of operator?
‘Typeof’ is an operator which is used to return a string description of the type of a variable.
The push method is used to add or append one or more elements to the end of an Array. Using this method, we can append multiple elements by passing multiple arguments.
Unshift method is like push method which works at the beginning of the array. This method is used to prepend one or more elements to the beginning of the array.
Strict mode can be enabled by adding the string literal “use strict” above the file.
30. What is the way to get the status of a CheckBox?
The status can be acquired as follows –
If the CheckBox will be checked, this alert will return TRUE.