Code Monkey home page Code Monkey logo

100daysofalxse's Introduction

100daysofALXSE Challenge

This is to keep track of my activities as i participate in the 100 days of code by ALX_Africa.

Day 1 - Revisiting Arrays in javascript

Today marks the beginning of my #100DaysOfCode challenge, and I decided to kick it off by revisiting one of the fundamental data structures in JavaScript: Array as a data structure is like a big container into which we can throw variables inside and reference later. Arrays can hold any number of values we want and they are also zero-based, meaning the first element is at index 0, the second at index 1, and so on.

Array Methods

  1. Push(): This method adds elements to the end of the array
  2. Pop(): Removes the last element of the array and we don't have to pass any argument
  3. Unshift(): Adds element to the beginning of the array
  4. Shift(): Removes element from the beginning.
  5. Slice(): Used to extract parts of an array without changing the original array
  6. Splice(): Works like the slice method but changes the original array. The extracted elements are taken out of the array
  7. indexOf(): Tells us in which position a certain element is in the array. Returns -1 for element not in the array.
  8. include(): returns true if the element is in the array.
  9. forEach(): Used for looping through an array

100daysofalxse's People

Contributors

kemelite1 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.