Question: JavaScrip Problems #7) Declare a function named square which has a variable 'x' which is 5 then returns x multiplied by itself (squares the number).

JavaScrip Problems

#7)

Declare a function named square which has a variable 'x' which is 5 then returns x multiplied by itself (squares the number). Then execute that function at the end of your code, the returned result should automatically print out in the console (being the last value run.)

Output:

JavaScrip Problems #7) Declare a function named square which has a variable

#8

Declare a function named square which has one argument/parameter/input and returns that argument multiplied by itself (squares the number). Then execute that function given the number 5, the returned result should automatically print out in the console (being the last value run.)

Output:

'x' which is 5 then returns x multiplied by itself (squares the

ust console values 25

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!