Question
I have a pile of JavaScript problems for you in this assignment.Do all of these. You may throw them all in one file with your
I have a pile of JavaScript problems for you in this assignment.Do all of these. You may throw them all in one file with your nameat the top as a comment. Do each problem as its own function, andcall each function for me in the file itself so it’s easy for me totest! ???? When I say print/display, use console.log(). If you’ve had141 already, these should be cake. If not, they might be a bittougher
1. Make a function that takes in a single input assumed to be aninteger. Run a for loop that prints “HI BOB” an amount equal tothat integer.
2. Do the same, but pass two parameters, the amount and a message tobe displayed. Instead of “HI BOB”, print the passed message thedesired amount of times.
3. Write afunction that displays the following table…
1 2 3 4 5
6 7 8 9 10
11 12 13 14 15
4. Write afunction that displays output according to this table. Pass in afloating point value, assumed to be a star rating. Use decisions.Consider using a switch if you have no experience withswitches!
Rating | Message |
0 | Terrible |
0-2.5 | Not Great |
2.5-4 | Alright |
4-5 | Dope |
Step by Step Solution
3.36 Rating (149 Votes )
There are 3 Steps involved in it
Step: 1
1 function printMessageinteger for let i 0 i integer i consolelogHI BOB 2 function ...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started