Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var thisYear = new Date(Date.now()).getFullYear();
- var year = 2015;
- if (year === thisYear) {
- console.log("I'm in the present!");
- } else if (year < thisYear) {
- console.log("Whoa! Blast from the past!");
- } else {
- console.log("Greetings from the future!");
- }
Add Comment
Please, Sign In to add comment