- Write functions that include a conditional, a loop, and 2 variables
- Predict the result of a JavaScript expression
- Compare
console.log()
andreturn
in JavaScript
- Start with the file
10_variables
. Typenode
in your console to access the node REPL. Copy and paste the code snippets into the REPL. Predict the results before pressingenter
. - When you finish all the numbered files, create a tic-tac-toe game with JavaScript. To play your game, open
index.html
in your browser.
Expressions:
- https://developer.mozilla.org/en/docs/Web/JavaScript/Guide/Expressions_and_Operators#Expressions
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Grammar_and_Types
Functions:
- https://developer.mozilla.org/en/docs/Web/JavaScript/Guide/Functions
- http://eloquentjavascript.net/03_functions.html
Functions with conditionals:
Functions with loops:
Arrays:
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Indexed_collections
Objects: