Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

ternary javascript

let a = -2 
let b = -4 
let c = 1
let d = 0
let e = 10 
let ans = a>b?
    	  a>c?
    	 a>d?'yes1':'no1'
		:b>c? 'yes2' : 'no2':
		e> b? 'mas malaki' : 'maliit daw'
		c>d?'yes3': 'no3'
console.log(ans)
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #ternary #javascript
ADD COMMENT
Topic
Name
9+3 =