How did you do?
- -Did you get extra points?
How did you do?
Up to this point, we have learned about data types, JS native objects, and some of the methods that we have access to with native JS. But when do we get to do stuff?
Now! I have mentioned that you have to start thinking like a computer. In order to help us, we have logical operators!
Truthy and Falsy
Great! Now we know when something is true or false. How can we compare values to begin making JavaScript work for us?
Enter the comparison operators!
In your day 3 in-class app.js file:
Below the previous code your app.js file:
Control Flow is quite simple: it is how we control what pieces of our code get executed (run).
In your app.js file:
In development (whether front or back end) you have to take edge cases into account. Basically, never trust your user to do what you would expect them to do. If you write a program that needs a string, make sure you check that they gave you a string and not a number or array. If it needs a number, check for that. We'll cover several examples of this in class.
On a new takehome-day3 branch, write a program that: