UX Design and Development course

Functions w/arguments that return a value

Playing with return functions

function myFunction(a, b) {
  // OMG JavasScript does math!
  var c = a + b;

  // Return statement
  return c;
}

Need to write the value of the function to the view

console.log(myFunction(9, 10));

Play with code

JS Bin