Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

ternary javascript

let a,b,c,d = [(3>1),(2>2),(4>2),(19>22),(19>22)] 

let ans = a?
   			b?
    		   a==d?'yes1' : 'no1'
			 :c==a?
    			d? 'malaki si b' : 'maliit lang daw'
			 : 'eto ung sagot 8787'
			:d==b? 'yes3' : 'no3'

console.log(ans)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #ternary #javascript
ADD COMMENT
Topic
Name
8+9 =