Jump to content

kwyjibear

Members
  • Posts

    3
  • Joined

  • Last visited

Everything 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?
  2. In the Learn JavaScript lessons, on the Throw page, it states that the command is... throw(exception) ...but in the first example, the Throw command appears as... throw "Err1" Shouldn't the exception be in parentheses?
×
×
  • Create New...