• +91 9723535972
  • info@interviewmaterial.com

Web Design Interview Questions and Answers

Related Subjects

Question - What are undefined and undeclared variables in JavaScript?

Answer -

Variables that have been declared already but not initialized are known as undefined variables.

On the other hand, if a variable is being used in a program without being declared, then it is considered an undeclared variable.

Consider the following example:

var undefVar;
alert(undefVar); // undefined variable
alert(notDeclared); // accessing an undeclared variable

Comment(S)

Show all Coment

Leave a Comment




NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners