课程: JavaScript: The Tricky Bits

今天就学习课程吧!

今天就开通帐号,24,700 门业界名师课程任您挑!

Solution walkthrough: Story generator

Solution walkthrough: Story generator - JavaScript教程

课程: JavaScript: The Tricky Bits

Solution walkthrough: Story generator

(upbeat music) - [Instructor] In this second solution video, we'll go through one way of completing the story generator challenge from start to finish. If you're looking for a shorter overview of the solution, you'll want to watch the previous video instead. The first task was to fix all the places where this wasn't working. We'll probably discover those by trying to make the app work and just fixing errors as we find them, we'll start with this one that's in the Console and hit the other ones as we find things. So I need to go to line 86 on start.JS. If I click that in the Console, it takes me to the debugger and I can get a preview of what I'll be looking at over in my editor, back here in Visual Studio code, I will use Control + G for go-to line and I'll type in 86 to get me down to line 86. So this is trying to use this inside this callback function, but we haven't used bind here. And indeed the challenge said not…

内容