Coder Social home page Coder Social logo

web-module-challenge-arrays's Introduction

Advanced CSS and Intro to JavaScript

Arrays

Objectives

  • use arrays to store and access data
  • use array properties and array methods

Introduction

Baskin Robins, a global chain of ice cream parlors, first opened in 1945 and served 31 flavors of Ice Cream. They have grown to almost 6,000 franchises world wide and have now became famous for serving exactly 31 flavors at a time. Since they first opened, they no longer serve the same 31 flavors, but they do always have exactly 31 ice cream flavors available.

Your challenge today will be to work with their array of ice cream flavors to access, remove, and add flavors, all while ensuring the length never exceeds 31.

Instructions

Task 1: Set up Project

Using VSCode and Command Line:

  1. Fork the repo
  2. Clone your forked version of the repo
  3. cd into your repo and create a branch with your first and last name
  4. open the terminal in your vs code and type npm install
  5. next type npm run test in your terminal
  6. Complete your work making regular commits, once you have all your tests passing and you are ready to submit your work please see canvas for instructions on how to submit

Task 2: MVP

Find the file index.js and complete the tasks until your returns look like the expected returns. Do not use any of the forbidden methods! Forbidden methods are .forEach(), .map(), .filter() and .reduce()

Testing & Debugging

Open a second terminal inside of your project by clicking on the split terminal icon alt text

Inside of your second terminal type npm start alt text

You will be running your tests in one terminal and debugging in the other. As you work on your code you should make use of console.log to check your progress and debug. alt text

Task 3: Stretch

There are several stretch goals inside index.js. You may work on these once you have finished MVP requirements for the day!

FAQs

Why aren't my results showing up in the console?

Make sure you are invoking your function after defining and wrapping a console.log around the invocation in order to view results in the console.

Resources

๐ŸคW3 Schools - JavaScript Arrays

๐ŸฆBaskin Robins Flavors

Submission format

Please submit your project via codegrade by following these instructions

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.