Javascript Null Iif Code Example


Example: javascript double question mark


let a = null;
const b = a ?? -1; // Same as b = ( a != null ? a : -1 );
console.log(b); // output: -1
//OR IF
let a = 9;
const b = a ?? -1;
console.log(b); // output: 9

//PS.,VERY CLOSE TO '||' OPERATION IN FUNCTION, BY NOT THE SAME

Comments

Popular posts from this blog

530 Valid Hostname Is Expected When Setting Up IIS 10 For Multiple Sites

C Perror Example

Converting A String To Int In Groovy