Jika kehadiran singkatan JavaScript
//If Presence Shorthand javascript
// Longhand method:
let x;
let y;
let z = 3;
// Shorthand :
let x, y, z=3;
//If Presence Shorthand javascript
// Longhand:
if (likeJavaScript === true)
// Shorthand:
if (likeJavaScript)
// Longhand:
let a;
if ( a !== true ) {
// do something...
}
// Shorthand:
let a;
if ( !a ) {
// do something...
}
Chetan Nada