75% Minimum | 100% Complete | Stretch | |
---|---|---|---|
Exercises P1 | exercise 1 | ||
Exercises P2 | up to 2-7 |
up to 2-10 |
up to 2-15 |
Exercises P3 | up to 3-3 |
up to 3-4 |
up to 3-5 |
Short questions all related to given set of functions.
These exercises aim to introduce you to testing.
You can run the files in the debugger.
- Open the terminal/Debug Console with
ctrl+j
(win) orcmd+j
(mac). - Open the
js
file you want to debug. - Select the debugger icon from the sidebar.
- Click the
Run and Debug
button. - Select the
Node.js
environment when promted.
The file will be executed and the output will be output to the debug console.
- You are only allowed to modify the
app.js
file, and perhaps theindex.html
. - Look over the HTML file before beginning.
- The
app.js
file contains relevant hints.
There are 4 buttons that are supposed to do different things when clicked.
- button one disappears (initial opacity is
100
) - button two turns 'crimson'
- button three turns 'lightblue'
- button four starts shaking... (animation provided in styles css as a class called
jitters
)
- Reimplement the functionality of
3-1
(Try to NOT look at your previous solution).
- This time the buttons should toggle.
- Meaning if the user clicks on them a second time, it should go back to initial state.
- Initial button color is
gold
.
- Reimplement the functionality of
3-1
and3-2
- There should be a RESET button that "resets" all of the buttons to their original state.
Create a game board. The CSS will, for the most part, take care of itself as long as you assign the right classes to the cells.
- set the size of the board to a square of
600px
; - set a number of cells per row;
- the cells should all be square.
- cells should have a class of
cell
- cells should have and id of
cell-#
- Use the grid code you wrote in 3-4
- Allow the user to create cells on the board based on values he/she inputs.
- Ask the user the number of
ROWS
andCOLUMNS
- Use those values to generate a grid