Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

How does ternary operator work?

const num1 = 3;
const num2 = 3;
num1 == num2 ? console.log('true') : console.log('flase');
//Expected output: true
 
PREVIOUS NEXT
Tagged: #How #ternary #operator
ADD COMMENT
Topic
Name
1+5 =