- Create an Array
- Accessing Elements
- Update Elements
- Arrays with let and const
- The .length property
- The .push() Method
- The .pop() Method
- More Array Methods
- Arrays and Functions
- Nested Arrays
- Review Arrays
If you are not familier with them please download Learn JavaScript eBook at https://codingwithbasir.com/learn-javascript
- Create a html file with your name like john.html
- Add current code to that file:
<!DOCTYPE html>
<html>
<body>
<script>
// your code here
</script>
</body>
</html>
- Define an array named
shoes
and put these items into it:
- Casual Shoes
- Sneakers
- Sandals
- Boat shoes
- Dress Shoes
-
Log first item and last item into console. For last item use
length
property. -
Change last item of array to
Derby Shoes
and log last item into console. -
Add
Espadrilles
to the array and log last item into console. -
Remove last 3 item of array and log last item into console.
-
Create a function named
showLength
that accept an array and log the length of array into console.