This webpage application takes numerical input, creates an array counting from 0 to input number and then loops through the array replacing certain numbers with strings
Describe: roboOutput()
-
Test: "It should return an array of numbers from 0 to the user's inputted number"
Code: roboOutput(5);
Expected Output: [0, 1, 2, 3, 4, 5] -
Test: "It should replace any number with a 3 in it as 'won't you be my neighbor?'"
Code: roboOutput(15)
Expected Output: [0, 1, 2, "won't you be my neighbor?", 4, 5, 6, 7, 8, 9, 10, 11, 12, "won't you be my neighbor?", 14, 15] -
Test: "It should replace any number with a 2 in it as 'boop'"
Code: roboOutput(12)
Expected Output: [0, 1, "boop", "won't you be my neighbor?", 4, 5, 6, 7, 8, 9, 10, 11, "boop"] -
Test: "It should replace any number with a 1 in it as 'beep'"
Code: roboOutput(10)
Expected Output: [0, "beep", "boop", "won't you be my neighbor?", 4, 5, 6, 7, 8, 9, "beep"]
Software Requirements
- Internet browser
- A code editor like VSCode or Atom to view or edit the codebase.
Open by downloading:
- Download this repository onto your computer by clicking the 'clone or download button'
- Double click index.html to open it in your web browser
Open via Bash/GitBash:
- Clone this repository onto your computer:
git clone {PUT_REPO_HERE} - Navigate into the
{NAME_OF_DIRECTORY}directory in Visual Studio Code or preferred text editorcode . - Open index.html in Chrome or preferred browser:
open index.html
To see my live website click here!
No known bugs
Please reach out via GitHub
- HTML
- CSS
- JavaScript
- VSCode
Copyright (c) 2023 Joshua Khan