JAVASCRIPT CHEAT SHEET
0
komentar
Download Javascript Tutorial. A JavaScript can be included both in the header and/or the body of the document, the choice depends on the task. There can be several JavaScripts in a document.
In JavaScript semicolons are optional. Use them anyway, it is more secure! Whitespaces are ignored by JavaScript, unless as part of a String (e.g. ”I like JavaScript”) and for separating keywords, variable names, numbers and functions. JavaScript is case sensitive, that means: bgColor is not equal to bgcolor.
Using var outside of function is optional. Assigning variables using var inside of functions is required if (a) we want to declare a local variable and a global variable with the same name already exists.(b)If recursive functions use variables with the same name.
Variables in JavaScript have in general global scope. However, variables assigned inside of functions have function-local-scope. Take care, if you define a local variable in a function and a global variable with the same name exists, the global variable is not visible any more inside the function, no matter where you define the local variable.
Download Javascript Tutorial
In JavaScript semicolons are optional. Use them anyway, it is more secure! Whitespaces are ignored by JavaScript, unless as part of a String (e.g. ”I like JavaScript”) and for separating keywords, variable names, numbers and functions. JavaScript is case sensitive, that means: bgColor is not equal to bgcolor.
Using var outside of function is optional. Assigning variables using var inside of functions is required if (a) we want to declare a local variable and a global variable with the same name already exists.(b)If recursive functions use variables with the same name.
Variables in JavaScript have in general global scope. However, variables assigned inside of functions have function-local-scope. Take care, if you define a local variable in a function and a global variable with the same name exists, the global variable is not visible any more inside the function, no matter where you define the local variable.
Download Javascript Tutorial
0 komentar:
Post a Comment