Skip to content
 
 

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JavaScript Arrays Activity

This repository contains an interactive learning activity focused on JavaScript arrays. The exercises will help you practice fundamental array methods and operations, including adding, removing, and modifying elements.

Files in this Repository

  • index.html – A simple HTML file that links to the JavaScript files.
  • array-exercises.js – A collection of 10 exercises covering essential JavaScript array methods.
  • practice-problem.js – A word problem requiring array manipulation to reinforce the concepts learned.

How to Use

  1. Clone or download this repository.
  2. Open index.html in your browser.
  3. Open the browser console (right-click → Inspect → Console) to see the output of the exercises.
  4. Modify the JavaScript files as needed to experiment with array methods.

JavaScript Array Methods Covered

  • .push() – Adds an element to the end of an array.
  • .pop() – Removes the last element of an array.
  • .unshift() – Adds an element to the beginning of an array.
  • .shift() – Removes the first element of an array.
  • .length – Returns the number of elements in an array.
  • .join() – Converts an array into a string with a specified separator.
  • Accessing elements using indexes (e.g., array[0] for the first element).

Additional Resources

About

Practice

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages