Skip to content

CodeYouOrg/webdev-js-intro-07

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction to JS: Functions

Overview

In this assignment, we will cover the basics of functions in JavaScript. Except for the pop and shift methods, all of the functions in this series have just performed a set of directions and that is it. We will dig a little deeper regarding the different types of functions you can create. You will have a concept introduction that will provide examples on how to create and use functions, a section to experiment, and a short assignment to put the concepts into action.

Instructions

Prerequisites

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

Cloning the Repository

Follow these steps to fork and clone the repository:

  1. Open your terminal or Git Bash.
  2. Navigate to the directory where you want to store the project.
  3. Fork the repository.
  4. Clone the forked repository to edit on your local computer.

Viewing the Project

To view the project locally, you can either open the project files in your code editor or open the HTML files in your browser.

Tasks

Part 1.

  • 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.

Part 2

  • Navigate to the Assignment Page
  • Read the assignment overview and output section.
  • In assignment.js:
    • Create a function called returnTheRemainder that returns the remainder of the division of two numbers. This function should take in two arguments and return a value.
    • Create a function called checkIfEven. This function should return true or false based on the input.
    • Create a function called getTheFourthElement. This function should take in the existing array, lostNumbers, and return the fourth element of the array.
    • Create the remaining functionality to render your answers.

Tips

  • 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.

Submitting Your Work

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published