Giter Site home page Giter Site logo

array_exercise's Introduction

JavaScript Development

Class Work

Instructions

  • Fork the repo
  • pull starter-code to local machine
  • run npm install
  • start coding
  • when complete run npm test to test your code

Submission

Upon completion, run the following commands

$ git add .
$ git commit -m "done"
$ git push origin master

Navigate to your repo and create a Pull Request -from your master branch to the original repository master branch.

In the Pull request name, add your name and last names separated by a dash "-"

Question

Draw a Pyramid aligned to center side of the screen. using 'x' as the value.

output:
         x
        x x
       x x x
      x x x x
    x x x x x x

Draw a Pyramid aligned to the left side of the screen. using 'x' as the value.

output:
    x
    xx
    xxx
    xxxx
    xxxxx

Compute the sum of the array below.

let arr = [[2, 12], [3, 27], [5, 15]]

From the data below write a loop that displays only the names and year of people.

write another loop that only name and adds 20 to the year

let sampleData = {
    page: 1,
    per_page: 3,
    total: 12,
    total_pages: 4,
    people: [
        {
            id: 1,
            name: "Suliatu Moji",
            year: 2000,
            color: "#98B2D1",
            pantone_value: "15-4020"
        },
        {
            "id": 2,
            "name": "Maleek Berry",
            "year": 2001,
            "color": "#C74375",
            "pantone_value": "17-2031"
        },
        {
            "id": 3,
            "name": "Khalid Mustafar",
            "year": 2012,
            "color": "#BF1932",
            "pantone_value": "19-1664"
        },
        {
            "id": 4,
            "name": "Jaafar Abdul",
            "year": 2001,
            "color": "#C74375",
            "pantone_value": "17-2031"
        },
        {
            "id": 5,
            "name": "Moheed Reema",
            "year": 2021,
            "color": "#C74375",
            "pantone_value": "17-2031"
        }
    ]
}

Further Resources

array_exercise's People

Contributors

i-am-ebere avatar

Watchers

James Cloos avatar  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.