Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

multi ternary operation in javascript

const guessNumber = 8
const correctAnswer = 8

const message = guessNumber > correctAnswer ? 'The Guess was too High!' 
    : (guessNumber < correctAnswer) ? 'The Guess was too low!' 
    : 'Perfect guess!'

console.log(message)
 
PREVIOUS NEXT
Tagged: #multi #ternary #operation #javascript
ADD COMMENT
Topic
Name
6+1 =