Answers for "what is the difference between console.log and return"

0

what is the difference between console.log and return

/* this is a function that return the square of the argument */
var square = function(x) {
  return x * x;
}
/* we want to log in the console the value of x+(x*x)
var x = 7;
console.log(x + square(x));
/* should log 7+(7*7) => 7+49 => 56 in the console
Posted by: Guest on January-10-2021

Code answers related to "what is the difference between console.log and return"

Code answers related to "Javascript"

Browse Popular Code Answers by Language