For buisness applications and wep app.
- nodejs - sudo apt install nodejs, sudo apt install npm
- typescript
- in console
- freely use white space
- commenting
- // ___ single comment
- /* */
declaring variables
- let
- int, float, boolean, string
- camalcase - accountNumber
- private - _accountNumber
- automatically generated - $accountNumber
__proto__
- non standard features
- const
- fixed
- var
- variable naming variables common error variables
- if ... else - conditional
- comparinf === ==
- Truthy Falsy
- The ternary Operator
- Blockscope
- for, while...
(condition)? true statement: false statement;
function showMessage(){
}
showMessage();
let showMessage = function(message, firstName){
console.log(message, firstName);
}
showMessage(message, firstName);
let person = {
name : "Revathy",
hour : 40,
Time : True
};
let person = {
name : "Revathy",
hour : 40,
Time : True,
showInfo: function(){
showmessage(this.name) // property name
}
};
person.showInfo();
showMessage( typeof person.showInfo) // function
The objects are at https://developer.mozilla.org/en-US/docs/Web/JavaScript.
HTML element - style
- []
- Array.of()
manupulating array. values.push('value') - pushing value to last element of array values. values.pop() -take last element. values.shift() - first element take out. values.unshift('value') -add the element to first.
values = ['1','2'];
newValue = values.slice(1)// 1 only
splice