This assignment will cover the JavaScript objectives from weeks one and two, including:
- Functions
- Objects
- Nested Arrays (two-dimensional)
- Conditionals
- Alerts and Prompts
Be encouraged to ask questions or point out issues in the assignment!
Mentors will be happy to help out and your fellow students will benefit from your input.
Clone this repository so that the code is available on your local machine:
Note: Run this command from the directory where you want to store your code (ex.
lessons/
)
git clone git@github.com:Code-the-Dream-School/web-basics-2-week-3-[your-username].git
Navigate to the directory you just cloned in your terminal:
cd web-basics-2-week-3-[your-username]
Create a new local branch to work on separate from the mainline branch (master
):
git checkout -b assignment
Finally, open the project directory in your code editor and continue to the next section.
Ready for a fun challenge? This week you will be creating a Battleship game in JavaScript.
Battleship is a war-themed game for two players in which the opponents try to guess the location of each other's warships and sink them.
If you've never played Battleship before, you can learn more in the official rule book.
Click here to view the step-by-step instructions.
Check the status of your local repository to double-check the changes you made:
git status
Stage the JavaScript file that you edited:
git add index.js
Create a commit for the changes you made and add a message:
git commit -m "write your message here"
Push your branch to the remote repository (visible in GitHub):
git push origin assignment
Create a Pull Request in GitHub and request feedback:
- Navigate to the "Pull Requests" tab in your repository
- Click the "New pull request" button
- Set the base branch to
master
and the compare branch toassignment
- Click the "Create pull request" button
- Ask a mentor for feedback in Slack or add them as a reviewer
Once your assignment has been reviewed, click the button to "Merge" your Pull Request and celebrate 🎉
Created by Code the Dream