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

JS - Outputting condition with prompt

0 votes
7 views
added Jul 6 in Javascript by LC Marshal Lieutenant (14,570 points)
edited Jul 13 by LC Marshal
//Condition with prompt question
  let year = prompt('In which year was ECMAScript-2015 specification published?', '');
  if (year == 2015) {
    alert( 'You are right!' );
  } else if (year < 2015) {
    alert('hey, do you think ECMAScript is so outdated?')
  }
  else {
    alert('Wrong, wrong, 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.
...