Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function speedInfo(input) {
- let currentSpeed = parseFloat(input[0]);
- if (currentSpeed > 1000) {
- console.log("extremely fast");
- } else if (currentSpeed > 150 && currentSpeed <= 1000) {
- console.log("ultra fast");
- } else if (50 < currentSpeed && currentSpeed <= 150) {
- console.log("fast");
- } else if (10 < currentSpeed && currentSpeed <= 50) {
- console.log("average");
- } else if (currentSpeed <= 10) {
- console.log("slow");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment