Keywords
var is used to declare variables
//………. or /*………/* is used for comments
All JavaScript identifiers are case sensitive.
lower case Camel case is widely used by JavaScript programmers
Operators
| + | Addition |
| – | Subtraction |
| * | Multiplication |
| ** | Exponentiation |
| / | Division |
| % | Modulus (Division Remainder) |
| ++ | Increment |
| — | Decrement |
JavaScript Function syntax
A JavaScript function is defined with the function keyword, followed by a name, followed by parentheses ().
Example:
function name (parameters){
Code…………………..}
Objects
var person = {
firstName: “John”,
lastName: “Doe”,
age: 50,
eyeColor: “blue”
};
Every objects has a nam
Accessing Objects in JS
objectName.propertyName or objectName[“propertyName”]
can be used to call the