When you started this course, you hadn’t written a line of code. Now you have scratch/snacks.js, a small movie-night calculator that runs on your own computer, and you can change it, run it again, and fix it when it breaks. That’s a real program, and it’s yours!
This last lesson starts with one more short task from memory, because working without the instructions open shows you what you’ve really got. After that, you’ll review what you can do now, with links back to each lesson, and see where the next course picks up.
Try It Once More on Your Own
Before you read any further, close the other lessons and give yourself about five minutes with VS Code. Work through these steps without looking anything up.
- Open your
js-coursefolder and a terminal whose prompt ends injs-course. - Create a new file in
scratch, named after anything you like, such aspizza.js. - Write one line that prints a message and one line that prints a calculation with a label.
- Write down the output you expect, then save, run, and compare the result with your prediction.
- Change one number, save, and run again.
- Delete a closing quote, save, run, and read the error. Then put the quote back, save, and run again to check the fix.