Skip to content

Instantly share code, notes, and snippets.

@Smrtcoder
Last active July 20, 2019 05:02
Show Gist options
  • Save Smrtcoder/0a7f0563aa897832b2efd595a5bcf106 to your computer and use it in GitHub Desktop.
Save Smrtcoder/0a7f0563aa897832b2efd595a5bcf106 to your computer and use it in GitHub Desktop.
In this project using Java Script, I had to discover what my age would be in Dog Years.
app.js
//my age
const myAge = 31
//earlyYears won't change
let earlyYears = 2;
earlyYears *= 10.5;
//myAge minus 2
let laterYears = myAge - 2;
laterYears *= 4
//lower case name
let myName = "Hayward";
console.log(earlyYears);
console.log(laterYears);
//earlyYears and laterYears equals
let myAgeInDogYears = earlyYears + laterYears;
console.log(`My name is ${myName}. I am ${myAge} years old in human years which is ${myAgeInDogYears} years old in dog years.`);
@mohitd12
Copy link

Hahah! 137 dog years.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment