Check if number negative

number = prompt("Pick a number?"); if (number > 0){ alert("Oh baby, your number is so big!");} else if (number === 0){ alert("Hey, there's nothing there!");} else{ alert("Wow, that thing's so small it might be negative!");}

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.