ijay
July 7, 2020, 9:37pm
1
Tell us what’s happening:
Hi,
please assist cant pass this stage
Your code so far
function timesFive() {
return 5 * 5;
function timesFive()
return 2 * 5;
function timesFive()
return 0 * 5;
}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36
.
Challenge: Return a Value from a Function with Return
Link to the challenge:
Learn to code. Build projects. Earn certifications.Since 2015, 40,000 graduates have gotten jobs at tech companies including Google, Apple, Amazon, and Microsoft.
Hi, it looks like you are trying to hard code values, which won’t work right.
In the challenge example
function plusThree(num) {
return num + 3;
}
we have a function that returns any number plus three.
I’d start by looking at this function and trying to modify it to use multiplication instead of addition. Then I’d change the 3 to a 5.
I hope this helps!
1 Like
ijay
July 7, 2020, 9:53pm
3
you are right i want to learn...
what about this(function timesFive(num) {
return num * 5;
console.log(timesFive(5));
function timesFive(num)
return num * 5;
console.log(timesFive(2));
function timesFive(num) {
return num * 5;
console.log(timesFive(0));
}