Files

22 lines
564 B
Markdown
Raw Normal View History

2018-10-12 15:37:13 -04:00
---
title: Passing Values to Functions with Arguments
---
# Passing Values to Functions with Arguments
---
## Problem Explanation
2018-10-12 15:37:13 -04:00
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:
```javascript
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.
2018-10-12 15:37:13 -04:00
```javascript
functionWithArgs(7, 3);
//This will console log 10.
```