Skip to content

GBProductions/neighborhood

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Mr. Roboger's Neighboorhood

Program returns a range of numbers with certain rules and styles applied.

February 11th 2021

By Garrett Brown

Description

Web application that takes an input number and returns a range of numbers. There are certain exceptions, with certain numerical digits being swapped for certain words.

Specs

Rules:

* The following rules are written in order ascending of power (i.e. rule #3, overrules rule #2).
    * Rule 1: Numbers that contain a 1: all digits are reploaced (all digits) with "Beep!"
    * Rule 2: Numbers that contain a 2: all digits are reploaced (all digits) with "Boop!"
    * Rule 3: Numbers that contain a 3: all digits are reploaced (all digits) with "Won't you be my neighbor?"

Describe: rangeCreate()

  • Test: "If the number 0 is inputted, it should return an array with 0 in it."

    • Expect: (rangeCreate(0).toEqual([0]))
  • Test: "If the number 5 is inputted, it should return an array filled with a range from 0 to 5 in it."

    • Expect: (rangeCreate(5).toEqual([0,1,2,3,4,5]))
  • Test: "If the number 5 is inputted, it should return an array filled with a range from 0 to 5 in it."

    • Expect: (rangeCreate(5).toEqual([0,1,2,3,4,5]))
  • Test: "If the number 3 is inputted, it should return an array filled with a range from 0 to 3 in it, with Rule 1 applied."

    • Expect: (rangeCreate(3).toEqual([0,"Beep!",2,3]))
  • Test: "If the number 3 is inputted, it should return an array filled with a range from 0 to 3 in it, with Rule 2 applied, and Rule 1 applied."

    • Expect: (rangeCreate(3).toEqual([0,"Beep!","Boop!",3]))
  • Test: "If the number 3 is inputted, it should return an array filled with a range from 0 to 3 in it, with Rule 3 applied, and Rule 1 and Rule 2 applied."

    • Expect: (rangeCreate(3).toEqual([0,"Beep!","Boop!","Won't you be my neighbor?"]))
  • Test: "If the number 15 is inputted, it should return an array filled with a range from 0 to 15 in it, with Rule 3 applied, and Rule 1 applied, but Rule 3 overrules 1."

    • Expect: (rangeCreate(15).toEqual([0,"Beep!",2,"Won't you be my neighbor?"..."Beep!, Beep!,"Won't you be my neighbor?", "Beep!", "Beep!"]))
  • Test: "If the number 23 is inputted, it should return an array filled with a range from 0 to 15 in it, with Rule 3 applied, and Rule 2 applied, but Rule 3 overrules 2."

    • Expect: (rangeCreate(15).toEqual([0,1,"Boop!","Won't you be my neighbor?", ..., 19, "Boop!", "Boop!", "Boop!", "Won't you be my neighbor?"]))

Setup/Installation Requirements

  • Open terminal and navigate to 'Desktop'.
  • In terminal, type 'git clone https://github.com/GBProductions/neighborhood.git' and press enter.
  • In terminal, type 'cd neighborhood' and press enter.
  • In terminal, type 'code .' and press enter to open project in VS Code.
  • Right click on 'index.html' and select 'Open with Live Server' to view page in your favorite web browser.

Known Bugs

There are currently no known bugs.

Support and contact details

For support, please contact Garrett Brown at garrettpaulbrown@gmail.com

Technologies Used

  • HTML, CSS, JS
  • Bootstrap, JQuery
  • VS Code, GitHub

License

Available under MIT Licensing

Copyright (c) 2021 Garrett Brown

About

Epicodus Week 3 Assignment: Arrays and Looping

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published