The latest ECMAScript standard defines 7 data types:
best way to check something is available
if(typeof x !== 'undefined'){
console.log('Exists');
}else{
console.log('Not Exists');
}
Equality
== If variables are 2 diffrent types , it will convet them to the same type and check
=== There will be no type conversion
Use === as default.
Node.js ENV variable
Use node-foremon or nodemon
- Six data types that are primitives:
- Boolean
- Null
- Undefined
- Number
- String
- Symbol (new in ECMAScript 6)
- and Object
best way to check something is available
if(typeof x !== 'undefined'){
console.log('Exists');
}else{
console.log('Not Exists');
}
Equality
== If variables are 2 diffrent types , it will convet them to the same type and check
=== There will be no type conversion
Use === as default.
Node.js ENV variable
Use node-foremon or nodemon
No comments:
Post a Comment