Files
Randell Dawson 1494a50123 fix(guide): restructure curriculum guide articles (#36501)
* fix: restructure certifications guide articles
* fix: added 3 dashes line before prob expl
* fix: added 3 dashes line before hints
* fix: added 3 dashes line before solutions
2019-07-24 13:29:27 +05:30

564 B

title
title
Passing Values to Functions with Arguments

Passing Values to Functions with Arguments


Problem Explanation

Our task is to create a function that has parameters. These are inputs that determine the function's output. You place paramaters inside the (), like so:

function functionWithArgs(one, two) {
  console.log(one + two);
}

We now have to add code inside the brackets. Our task is to add one and two, and print the sum to the console.

functionWithArgs(7, 3);
//This will console log 10.