V School | Better Humans, Better Outcomes

Catch Me If you Can

1a) Write a function that returns the sum of two numbers. Throw an error if either argument is not of the data type number: function sum(x, y){ //check data types first and throw error return x + y; } 1b) Call the sum function inside a try block using "1" and

Error Handling

When running JavaScript errors can occur. These can be made by mistakes in programming, unexpected values in input and other errors. To handle these errors the JavaScript programming language has these tools. The try keyword allows us to test blocks of code try { //your code } The code within the try

Understanding RESTful API Architecture

As you begin to develop your own backend API for accessing data, you'll find that things can get complex very quickly. There's a principle called REST (short for Representational State Transfer) which is a widely used design principle when creating APIs. There are a lot of specific, nuanced rules in

Mongoose Schema Practice

Create a new server from scratch and make a new mongoose schema of any kind that includes at least 5 properties. Make a model from the schema (you'll use mongoose.model(...)), and use that model to create a new instance of your schema in the database. No need to worry

Balance Parentheses

Given a string including parentheses, write a function that returns true if every opening parentheses has a closing parentheses. Example function balanceParentheses(str){ // Your code here } balanceParentheses("()()") // Output: true balanceParentheses("(())") // Output: true balanceParentheses("()))") // Output: false Also, every closing parentheses needs an opening partner before it. balanceParentheses(")()(") // Output: false balanceParentheses("())(") // Output:

V School | Better Humans, Better Outcomes © 2026