Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function solve ( strNumber) {
- let receivedInput = strNumber;
- switch (strNumber) {
- case "zero": console.log(0); break;
- case "one": console.log(1); break;
- case "two": console.log(2); break;
- case "three": console.log(3); break;
- case "four": console.log(4); break;
- case "five": console.log(5); break;
- case "six": console.log(6); break;
- case "seven": console.log(7); break;
- case "eight": console.log(8); break;
- case "nine": console.log(9); break;
- case "ten": console.log(10); break;
- default: console.log("the input is not recognized"); break;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement