function lifeInWeeks(age) { //Write your code here. let x = age let monthsLeft = (90 - x) * 12 let weeksLeft = ((90-x) * 52) let daysLeft = ((90-x) * 365) console.log("You have " + daysLeft + " days, " + weeksLeft + " weeks, and " + monthsLeft + " months left to live"); }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter