Intro/Intermediate JS and unit testing with Jest
What are we trying to accomplish?
By the end of this lecture you'll learn how to utilize JavaScript to solve programming tasks and some of the features and syntax unique to the language. Additionally, you'll learn how to utilize jest, a JavaScript testing framework that allows us to test our code for correctness.
Lectures & Assignment
- Lecture - JS intro
- Assignment - Factorial in JS
- Assignment - Roman Numerals in JS
- Lecture - Jest
- Assignment - Fibonacci in JS
- Assignment - Linear Search in JS
Stuck? Have a code error? Use the "4 Before Me" debugging checklist to help you solve it!
Terminal Learning Objectives
- Pass by value vs Pass by reference
- Variables
- Functions
- Primitive Data Types
- Complex Data Types
- the ternary operator
- loops (
for,for ... of,Object.entries) - 'Arrow' functions
- Destructuring
- The spread operator (
[...]) exports/requiresyntaxnpmbasics- What is a unit test
- Using Jest as a test runner
- Using
expectas an assertion library - skipping tests
Enabling Learning Objectives
n/a - all of the JS skills you learned will be needed in future assignments and assessments as we dive into the frontend and React.js, but your first Assessment (Assessment 1) will focus on Python. However if you don't take the time now to gain proficiency in these JS skills you will struggle later on.