From the course: JavaScript Essential Training

Exploring the lab environment - JavaScript Tutorial

From the course: JavaScript Essential Training

Exploring the lab environment

- [Instructor] This course includes 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 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 your course page where you watch your courses' 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. The code challenge has four areas: instructions in the top left, a code editor for your answers in the top right, another code editor where you see how your code is used in the bottom right, and a console for output in the bottom left. You can use these drag handles to allocate more space as you like. To get even more horizontal space for the code editors, you can also collapse the course's table of contents on the left. Before each challenge, I'll explain the goal of the challenge, where to input your solutions, and how to test your code. Create your answers 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 in the console indicating whether your code returned the correct results. for JavaScript challenges you'll see what test passed, what tests failed, your correct output, and whether you need to do something else. If your code is not successful, for example, if I changed output here to just numbers and run my test code again, you'll get a different message. If you scroll down to the bottom of that message, you'll see if you set showExpectedResult to true you'll see the correct value and if you set showHints to true, you will see a hint. These values are set up here in the answer column. The defaults are set to false. You can change them to true to get that information in the console. The code editor in the lower right shows how your solution is used. You can change this code to experiment with different test cases if you want to. For example, I can put in the correct answer, change one of the values down here, and test my code again. And as you can see the test still passes even though I changed these values. Regardless of whether your answer is successful you'll always see messages in the console output in the lower left. If any messages are too long to fit that area, you can scroll sideways to see all of the texts. When you finished each of the code challenges, return to the course table of contents and click the next video to see my solution.

Contents