Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialLeslie Wolfe
8,700 Pointsgetting a "window.setTimeout is not a function" error in the console.
I'm copying the code exactly as it is from the video and I get an error:
window.setTimout((something) => {
console.log(something);
}, 3000, 'Greetings, everyone!');
VM268:1 Uncaught TypeError: window.setTimout is not a function at <anonymous>:1:8
Any help to understand this would be great. Thanks!
3 Answers
Stephan Olsen
6,650 PointsYou misspelled the function name. It should be setTimeout and not setTimout.
window.setTimout((something) => {
console.log(something);
}, 3000, 'Greetings, everyone!');
Alejandro Narvaja
Courses Plus Student 7,340 PointsHi, the error is in the word TimOut. The correct word is: TimeOut.
Leslie Wolfe
8,700 Pointsah. Sorry to waste your time with this stupid mistake! Thank you!
Alejandro Narvaja
Courses Plus Student 7,340 PointsNo problem. The error in words are fairly common and something that a developer have to review always.