2. Difference between an alert box and a confirmation box?
Ans. An alert box displays only one button which is the OK button.
But a Confirmation box displays two buttons namely OK and cancel.
3. Explain escape characters?
Ans. Escape characters (Backslash) is used when working with special characters like single quotes,
double quotes, apostrophes and ampersands. Place backslash before the characters to make it
Ans. Cookies are the small test files stored in a computer and it gets created when the user visits the
websites to store information that they need. Example could be User Name details and
shopping cart information from the previous visits.
Ans. The pop() method is similar as the shift() method but the difference is that the Shift method
works at the end 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.
Ans. No It doesn’t.
has scope inside the function.