课程: JavaScript Practice: Object-Oriented Programming
Introduction to CoderPad - JavaScript教程
课程: JavaScript Practice: Object-Oriented Programming
Introduction to CoderPad
- [Instructor] On the top left, you'll see a list of parameters and functions that your JavaScript objects will take. 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. You'll also see that noted here. The constraints section has useful information about the parameters that will be passed in. The examples show different parameter values and what results would be returned for each test case. Create your answer in the top right of the code editor. There are comments in the starting code showing you where to put your solution. When you click Test my code, you'll see a message indicating whether your code returned a correct result. If your code isn't successful, you can ask for help. The showExpectedResult and showHints variables determine whether you'll see the expected result and any hints. Change them to a value of true to control the output. The code editor in the lower right shows how your solution is used. You can change that 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 scroll sideways to see all of the text. When you've finished each code challenge, return to the course's table of contents, and click the next video to see my solution.