Local Variables − A local variable will be visible only within a function where it is defined. Function parameters are always local to that function.
62. What is callback?
63. Which built-in method returns the character at the specified index?
charAt() method returns the character at the specified index.
64. How typeof operator works?
The typeof is a unary operator that is placed before its single operand, which can be of any type. Its value is a string indicating the data type of the operand.
The typeof operator evaluates to “number”, “string”, or “boolean” if its operand is a number, string, or boolean value and returns true or false based on the evaluation.
Weekend / Weekday Batch
Once a Date object is created, a number of methods allow you to operate on it. Most methods simply allow you to get and set the year, month, day, hour, minute, second, and millisecond fields of the object, using either local time or UTC (universal, or GMT) time.
The Number object represents numerical date, either integers or floating-point numbers. In general, you do not need to worry about Number objects because the browser automatically converts number literals to instances of the number class.
Creating a number object −
var val = new Number(number);
If the argument cannot be converted into a number, it returns NaN (Not-a-Number).