leap year in javascript
function isLeap(year) {
if (year % 4 === 0) {
if (year % 100 === 0){
if (year % 400 == 0){
return ("Leap year.");
} else {
return ("Not leap year.");
}
} else {
return ("Leap year.");
}
} else{
return ("Not leap year.");
}
}function isLeap(year) {
if (year % 4 === 0) {
if (year % 100 === 0){
if (year % 400 == 0){
return ("Leap year.");
} else {
return ("Not leap year.");
}
} else {
return ("Leap year.");
}
} else{
return ("Not leap year.");
}
}
Also in JavaScript:
- align text center react native
- new component in angular command
- jquery validator no space
- package json scripts multiple commands
- animation library react
- implicit return arrow function
- js string to boolean
- cdn react
- break loop after time javascript
- javascript floor
- use vue cdn with firestore
- how to redirect to another page in javascript on submit type
- select all checkboxes html js
- javascript user agent detection
- how to scroll down to the bottom of a div using javascript
- check uncheck vanila js
- express get url parameters
- format money javascript commas
- redis nodejs
- Javascript check if undefined
- makes number negative javascript
- node check if file exists
- Prevent Double Submit with JavaScript
- function in react