Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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
8+1 =