/mr-roboger

Program that takes a user inputted number and creates a string out of fun little phrases. Created for my week 3 final project for Epicodus

Primary LanguageJavaScript

Mr Roboger's Neighborhood

Program produces robo-speak based on the user's input.

By Louie Schoenknecht

Technologies Used

  • HTML
  • CSS
  • JavaScript

Description

This page was created for my week 3 individual coding project at Epicodus. The page prompts the user to enter a number. Then, using loops and arrays, the page responds with robo-text. The robo-text is determined as follows: The program takes an input from the user and presents a string counting up to that number from 0. Any numbers in that string which contain the digit "3" are replaced with "Won't you be my neighbor?", any numbers containing the digit "2" are replaced with "Boop!", and any numbers containing the digit "1" are replaced with "Beep!"

Setup/Installation Requirements

  • To clone down and open the project, clone the Roboger repository from GitHub.
  • Navigate to root directory of project in terminal, and type 'open index.html' to view in browser.
  • Open project in a text editor to view code.

Specifications

Describe beepBoop()

  • Test: "It should return 0 if the user input is 0"

  • Expect (beepBoop(0)).toEqual([0]);

  • Test: "It should return a string of numbers from 0 up to and including the user inputted number"

  • Expect (beepBoop(5)).toEqual([0,1,2,3,4,5]);

  • Test: "If the number 3 is input, return a string where all numbers containing the digit 3 are replaced with 'Wont you be my neighbor?'"

  • Expect (beepBoop(3)).toEqual(Won't you be my neighbor?);

  • Test: "If the number 2 is input, return a string where all numbers containing the digit 2 are replaced with 'Boop!'"

  • Expect (beepBoop(2)).toEqual(Boop!);

  • Test: "If the number 1 is input, return a string where all numbers containing the digit 1 are replaced with 'Beep!'"

  • Expect (beepBoop(1)).toEqual(Beep!);

  • Test: "If number contains multiple digits with exceptions attached, prioritize exceptions in the order listed above."

  • Expect (beepBoop(32)).toEqual(Won't you be my neighbor?);

Known Bugs

  • No known bugs or issues

License

MIT Copyright (c) 2021

Contact Information

luisesch97@gmail.com