console.assert method is great for debugging and allowing you to see if a given condition is met at some point in your application. If the condition is false, an error message that you provide is printed to the console. If it's true, nothing is printed out.
You can pass as many arguments as you'd like to the method, as long as the first is the assertion, and as long as there's at least one argument after that.
The exercise for this section is as follows:
- Create worstPizza and bestPizza variables; give them separate values
- Do an assertion: worstPizza == bestPizza
- The error message should have multiple strings and these two variables
- Do the same assertion again, but the second argument should be an object
- The object should have both variables and the error message