JAVASCRIPT String interpolation exercise trouble


I'm stuck at the exercise in which you're supposed to use the console.log to print 'My favorite animal' following the exemple above in the lesson. Page 5/6 I think i put it right, tried several combinations but nothing works. Plus, all error messages don't make any sense to me as it says it's missing the semi-colon when it's actually here. The latest version of the code i tried is the simplest one, i thought would work at first and it doesn't include an error message...

var morningAlarm = '6:30AM';
morningAlarm = '9:00AM';
console.log('Morning alarm is set to: ', morningAlarm);
var favoriteAnimal = 'cat';
console.log('My favorite animal: ' + favoriteAnimal);


You just need to do what instruction says:

var favoriteAnimal = 'Koala';

I think that technically your code is correct but validation wants 'Koala' not 'cat'.


yeah, actually i just restarted the exercise i think something bugged at first cause i didn't have the koala bit written down. but i think i misunderstood the instructions to begin with!
Thanks anyway, case closed!! :wink:


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