kwyjibear
-
Posts
3 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by kwyjibear
-
-
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?
Lifetime of Variables
in JavaScript
Posted
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?