Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
  • Javascript Undefined Values

    • 0
    • 2
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 101
    Comment on it

    Javascript Undefined Values

    In a program the variables declared gets the value at the time of the variable declaration or get assigned after some calculation or received by the user input, but the variables which are not assigned any value at the time of the declaration are Undefined variables.

    We can say that the variables declared without a value have the value undefined.

    For Example:

    <!DOCTYPE html>
    <p id="demo"></p>
    var name;
    document.getElementById("demo").innerHTML = name;



    As in the above example the variable name declared but didn't assigned any value that means the variable has a value Undefined. So, as a result we get the output as undefined.

 0 Comment(s)

Sign In

Sign up using

Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: