Basic Java Script Notes. - Ahmed-Ayman/My-2017-Vacation GitHub Wiki
just some definitions and notes.
- JS strings are immutable, means that they cannot be altered once created.
JS objects
- it has properties and methods.
- you can access a prop by dot '.' --> obj.name ..... or by a brackets --> obj["name"] this one with the spaced props.
- to delete a prop .. delete obj.prop
- obj.hasOwnProperty() -> check out if it has this prop.
- access many nasted obj -> obj1.objNasted1.objNasted2["prop"].
- Math.floor(Math.random()*x) random between 0 , x
- regEx : - /exp/gi ...... global ignore line ........ - /\d++/g 3 digits ....\f \n \s \S