prompt, asking a question, length , alert, if else statement

PHOTO EMBED

Wed Nov 10 2021 15:32:40 GMT+0000 (UTC)

Saved by @KarenStewart #javascript #react.js

//if else statement with length condition//
let firstName = prompt(`What is your first name?`);
firstName = firstName.trim();
if (firstName.length < 1) {
  alert(`Too bad for you`);
} else {
  alert(`Welcome, ` + firstName);
}

(city === undefined)
(city !=== undefined)
(age > 3) (age >= 4)
(country === "brazil" || country === "portugal")
content_copyCOPY