Keywords
javascript, testing
Related to Curriculum
understanding how software works and how to ensure the quality of the written software
Prime Target Group
advanced elementary school students
Required Equipment and Material
text editor, browser
Short Description
In this exercise kids will learn how to use existing libraries and how to ensure the quality of the code they write through basic unit testing.
Open index.html
in a browser and in a text editor. Look at the existing code in index.html
and then try to modify it to complete the tasks below. You will need to modify the JavaScript.
Links that will help you complete the tasks are:
packPresent
function.deliverPresents
, so SantaClause packs enough presents before delivering them.Reindeer
that has a function feed
, which makes it more happy. Write an appropriate test before writing the code and check that the test passes when the code is written and the reindeer is happier indeed.