Web-Dev 101 Fundamentals 3 (Practice)


#1

I am stuck on the practice exercise at the bottom of the Fundamentals-3 lesson https://www.theodinproject.com/lessons/fundamentals-part-3#null on JavaScript.
It says “Write a function called add7 that takes one number and returns that number + 7.” How do you define the “one number”. Do you take a definite number by yourself or issue a browser prompt to enter?
Would appreciate some help.


#2

Hello, you have to define the function which takes an arguments for that one number.
For example something like below.

function add7(num)
{
return num + 7
}


#4

function add7(num){
alert(num+7);
}
var number;
number = parseInt(prompt(‘Give me a number’));
add7(number);