Guest User

Untitled

a guest
Jun 20th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. var d = new Date();
  2. var currentYear = d.getFullYear();
  3. var year=Math.floor((Math.random() * 3000) + 1);
  4. if (year===currentYear){
  5. console.log("I'm in the present!");
  6. } else if(year > currentYear){
  7. console.log("Greeting from the future!");
  8. } else{
  9. console.log("Whoa!Blast from the past!");
  10. }
Add Comment
Please, Sign In to add comment