Now that you have been introduced to the types of Operators that exist in JavaScript, this assignment on Conditionals will build upon it.
Before you begin, ensure you have the following installed:
- Git: Version control system to clone and manage the repository.
- GitHub: make sure you have an account to sync your repositories to.
- Code Editor: Any code editor like Visual Studio Code
Follow these steps to fork and clone the repository:
- Open your terminal or Git Bash.
- Navigate to the directory where you want to store the project.
- Fork the repository.
- Clone the forked repository to edit on your local computer.
To view the project locally, you can either open the project files in your code editor or open the HTML files in your browser.
- View the site with Live Preview.
- Read the concept content served from
index.html
. - Do the experiment section inside
index.js
. - When finished with experimenting, comment out everything in
index.js
. You can use these as references for future project/assignments.
- Navigate to the Assignment Page
- Read the assignment overview and output section.
- In
assignment.js
:- Create an immutable variable that will store a reference to the paragraph tag with the id of
response
. - Create a mutable variable called
age
, but do not assign it a value. - Write your conditional logic inside the
checkAgeAndRespond
function. - Read and try to understand the code that exists already. Write notes/questions and bring them to class.
- Create an immutable variable that will store a reference to the paragraph tag with the id of
- Push a commit for each task completed. Include a meaningfull commit message.
- Before the above, update the readme task list to track your progress. To do this, enter x between the brackets.
- Get used to using your browser's developer tools now. For now, become familiar with:
- Toggling between desktop mode and device emulation/responsive mode.
- Using inspector mode to inspect elements.
- If you get stuck, please remember that you have various resources available to you.
After completing the assignment, make sure to commit your changes and push them back to your own repository and turn in the GitHub link in Google Classroom.