课程: JavaScript Practice: Scope and Closures

Working with the CoderPad environment - JavaScript教程

课程: JavaScript Practice: Scope and Closures

Working with the CoderPad environment

- [Instructor] This course consists of automated code challenges that appear when you click on the challenge links in the courses table of contents. Each challenge includes instructions and a couple of code editors that you can use to create and test your own solution to the challenge. These challenges are hosted by CoderPad, and they appear in the same area of the course page where you watch the course's videos. We recommend using a desktop browser for the best experience with code challenges, but you can use the LinkedIn Learning mobile app if you prefer. So the code challenge has four areas. Our instructions are here in the top left, a code editor for you to write our answer in the top right, another code editor where you'll see how your code is used in the bottom right, and a console in the bottom left. And you can always grab these little handles to slide around these windows if you need more or less space. To get even more horizontal space for the code editors, you can collapse the course's table of contents on the left. Each challenge has instructions that include a description of the challenge and the challenge's parameters and desired result. Parameters are values that will be passed into your code, and they have to be of a particular data type. The return value also has to be of a particular type, and you'll also see that noted in the instructions. The constraints section has useful information about the parameters that will be passed in. The examples show different parameter values and what result would be returned for each of those test cases. Create your answer in the top right code editor. There are comments in the starting code showing where to put your solution. When you click test my code, you'll see a message indicating whether your code returned a correct result. So over here in the console output, you'll see that all of our tests have passed. If your code isn't successful, you can ask for help. So let me remove that spread operator. I'll test the code, and this will tell us that some of our tests have passed and some of them have not. The show expected result and show hints option, if I set those to true, are going to give me a little expected result as well as a hint. The code editor in the lower right shows how your solution is used. So you can change this code to experiment with different test cases. Regardless of whether your answer is successful. You'll see messages in the console output in the lower left. If any messages are too long to fit in that area, you can always scroll sideways to see all of the text. When you finished each code challenge, return to the course's table of contents and click the next video to see my solution.

内容