Not sure why i am getting syntax error


#1

var myAge = prompt('What is your age?');
var firstYears = 2 * 10.5;
var laterYears = (myAge - 2) * 4;
var myAgeInDogYears = firstYears + laterYears;
console.log('I am' + myAgeInDogYears + ' years old in dog years.');


#2

what topic is this, I don't know what you mean


#3

this is a project for pro members I think.


#4

take out the parenthesis and it should be perfect.
I like how you added in a string. I just returned the number.


#5

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.