What would be the result or type of error if p is not defined in the following JavaScript code snippet? [code] console.log(p) [/code]

Pham Quỳnh

New member
What would be the result or type of error if p is not defined in the following JavaScript code snippet?
Code:
console.log(p)
A. Zero
B. Null
C. Reference Error
D. Value not found Error
 
Answer: c
Explanation: Console.log() is a predefined function in javascript which is used to print data or message on the console. If the argument of the console.log is not defined it will give a reference error.
 

Tìm kiếm

Back
Top