Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js check if number is divisible by 2

if (variable % 2 === 0) {
  console.log("Even")
} else {
 console.log("Odd") 
}
 
PREVIOUS NEXT
Tagged: #js #check #number #divisible
ADD COMMENT
Topic
Name
1+2 =