Interviewer And Interviewee Guide

Expert Developer JavaScript Interview Question:

What is difference between undefined variable and undeclared variable?

Submitted by: Administrator
► The variable which are declared in the program but not assigned any value yet is called undefined variable while the variable which are not declared in the program is called undeclared variable.
► For Example :
undeclared variable:
<script>
var p;
alert(p); // This will give error because p is undeclared variable.
</script>
? undefined variable
<script>
alert(p); //This will give error because p is undefined.
</script>
Submitted by:

Read Online Expert Developer JavaScript Job Interview Questions And Answers
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.