Jump to content

kwyjibear

Members
  • Posts

    3
  • Joined

  • Last visited

Posts posted by kwyjibear

  1. W3Schools' JavaScript lessons state that a variable created in a function exists only inside that function. However I read elsewhere that that is not always the case. JavaScript tutorial at C PointAccording to them, a varialble declared in a function is local only if you use the var declaration. If you create the variable just by typing its name (example: variableName = "Hello World":) then it is considered global and will work outside the function.Is this so?

×
×
  • Create New...