Possible Answers

  1. Prompt(), like alert() and confirm() is a method of the window object.
  2. The first argument is displayed on the prompt box while the second is displayed as value of the text field. The second argument is optional, which means that JavaScript will not throw an error if you skip it. However, in such cases, JavaScript displays "Undefined" in the text field.
  3. String data type
  4. parseFloat() converts an input to a floating-point number.
    parseInt() converts the input to an integer.
  5. "abcd" is a string and cannot be parsed by parseInt(). JavaScript returns NaN (Not a Number).
  6. isNaN() is employed to check if the number is valid or not.