Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save akbarratt/bfaff884012cac6da70a42445938654e to your computer and use it in GitHub Desktop.
Save akbarratt/bfaff884012cac6da70a42445938654e to your computer and use it in GitHub Desktop.
Demonstrating Conditionals
let theNumber = Number(prompt("Pick a number"));
// console.log("Your number is the square root of " + theNumber * theNumber);
if (!Number.isNaN(theNumber)) {
console.log("Your number is the square root of " + theNumber * theNumber);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment