js check if number is divisible by 2
if (variable % 2 === 0) {
console.log("Even")
} else {
console.log("Odd")
}
Also in JavaScript:
- how to remove duplicates in array in javascript
- javascript random number between 0 and 10
- angular load json file with httpclient
- luxon plus
- jquery clear form values
- update angular cli
- js detect mouse support
- how to learn javascript
- tick.json code
- how to set time out in js
- js fill string with n characters
- data-dismiss= modal in jquery
- react native elements
- how to add json data to xmlhttprequest
- input type date doesn't work in ie
- how to create react app using yarn
- js create json array
- js capitalize first letter of each word
- set value of attribute using each and keyup jquery
- choropleth map of india which shows current date confirmed cases in every state json api python.
- javascript for eac loop
- heap sort javascript
- fire off some javascript on page load
- promise js