Takes a number input from the user and generates a range of numbers from 1 to the input number. Each response is evaluated against a set of rules that determine whether a number, 'ping', 'pong', or 'ping-pong' are displayed. This project was created to practice using arrays and looping during our third week at Epicodus.
Behavior Description | Input | Output |
---|---|---|
The program only allows numbers to be entered. | abc | 'Please enter a positive number.' |
The program only allows positive numbers to be entered. | -1 | 'Please enter a positive number.' |
The program will create an alert pop-up for a blank input submission. | (empty) | 'Please enter a positive number.' |
The program will display a sequential list of numbers from 1 up to the inputted number. | 3 | [1, 2, 3] |
The program recognizes numbers divisible by 3 and replaces them with "ping". | 3 | 1, 2, 'ping' |
The program recognizes numbers divisible by 5 and replaces them with "pong". | 5 | 1, 2, 'ping', 4, 'pong' |
The program recognizes numbers divisible by both 3 and 5 and replaces them with "ping-pong". | 15 | ... 'ping', 13, 14, 'ping-pong' |
- Clone portfolio-week-3 project from Github
- Open index.html in your favorite browser
- Read the rules listed above the input field
- Enter an appropriate number into the input field
You may also visit https://ebby89.github.io/Portfolio-Week-3 to view the web application.
None that I am currently aware of.
Please contact Kyle at --- kyle.m.ebersole@gmail.com --- with any questions or feedback!
- JQuery
- Bootstrap
- HTML
- CSS
- Javascript
No license available at this time.
Copyright (c) 2017 Kyle Ebersole