Are you first timer at lazacode.org? Why not join us and start exchange your programming knowledge with everyone. Register today!

JS - the non-traditional condition with ?

0 votes
16 views
added Jul 6 in Javascript by LC Marshal Lieutenant (13,570 points)
edited Jul 13 by LC Marshal
//Non-traditional use of ‘?’
let myOffice = prompt('Where my office located?', '');
(myOffice == 'Budapest') ?
 alert('Right!') : alert('Wrong.');

Please log in or register to response this reference.

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...