From the course: Learning JavaScript Debugging
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Solution: Other people's code - JavaScript Tutorial
From the course: Learning JavaScript Debugging
Solution: Other people's code
(electronic music) - [Instructor] Let's work through a solution to this other people's code challenge. First we're going to try shuffling and dealing a few times just to confirm that even though there's way too many cards, it does look like we're getting a variety here. So it's at least partially working. I don't see any duplicate cards. Some of them are getting hidden up here but it seems safe to say that we are not getting duplicates. And even though this is not working, giving us the right number of cards, there's at least some good in here. So we'll open up the developer tools and go to our debugger. Here's the cards.js file here. We know that we have a handler that takes care of shuffling and dealing. So let's go visit that and set a breakpoint. I'll click this and here we go. We're paused. The first thing that I want to do is confirm that the size of the deck that we're getting back is actually correct. So…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
Debugging the use of a jQuery plugin6m 7s
-
(Locked)
Debugging a React application in Chrome9m 8s
-
(Locked)
Debugging on iOS using Simulator6m 45s
-
(Locked)
Remote debugging on an Android device3m 23s
-
(Locked)
Challenge: Other people's code7m 52s
-
(Locked)
Solution: Other people's code6m 27s
-
(Locked)
Debugging a Node.js application in WebStorm11m 34s
-
(Locked)
Setting up the WordPress example3m 47s
-
(Locked)
Challenge: Debugging with an IDE2m 5s
-
(Locked)
Solution: Debugging with an IDE4m 47s
-
(Locked)
Debug a WordPress theme in Visual Studio Code5m 51s
-
(Locked)
Use a debugger as a learning tool on a live site5m 51s
-
-