Welcome to WebmasterServe!

FREE TO JOIN! Join us now to engage in informative and friendly discussions about Webmastering, SEO, SEM, Internet Marketing, Programming, Graphic Design, Online Jobs and more. What are you waiting for? Ready to join our friendly community? It takes just one minute to register.

Dismiss Notice

Join WebmasterServe Forums 
Join the discussion! Have a better idea or an opinion? It takes just one minute to register Click Here to Join

My 2 Cents What Are Undeclared And Undefined Variables In Javascript?

Discussion in 'Javascript and jQuery' started by steve taylor, Feb 28, 2016.

  1. steve taylor

    Yellow Belt

    Feb 12, 2016
    +25 / -0
    Undeclared variables are variable that do not exist in a program and are not declared. If the program read the value of an undeclared variable, then error occurred during run time.

    Undefined variables are variable that are declared in the program but not have been given any value. If the program read the value of an undefined variable, then undefined value is returned to output.
  2. Swati Mishra

    Yellow Belt

    Dec 28, 2015
    +105 / -0
    Undeclared variable can be declared anytime when a programmer find it to be done and the undefined can be given value at anytime an activity need to be take place. It is a good practice to save the memory allocation in some way.

Share This Page