Consider the following statements respect to JavaScript : (I) A variable is created using the var keyword.
Consider the following statements respect to JavaScript :
(I) A variable is created using the var keyword.
(II) JavaScript is untyped language.
Which of the above are true ?
Show answerHide answer
Correct answer: (D) Both (I) and (II)
Explanation
JavaScript variables can be declared with var, and JavaScript is untyped (dynamically typed), so the same variable can hold any type. Both statements are true.