Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript if

const number = (Math.random() - 2.5) * 5;
if (number < 0) {
	console.log('Number is negative');
}
if (number = 0) {
	console.log('Number is zero');
}
if (number > 0) {
	console.log('Number is positive');
}
Source by www.javascripttutorial.net #
 
PREVIOUS NEXT
Tagged: #javascript
ADD COMMENT
Topic
Name
1+5 =