- Home
- /
- Tutorials
- /
- JavaScript Tutorial
- /
- JavaScript Function Parameters
JavaScript Functions
JavaScript Function Parameters
JavaScript function parameters are the names listed when a function is defined.
The values you actually pass in when calling the function are called arguments.
Parameters work like variables that only exist inside the function.
Example
Example
javascript
function greet(name, city) {
return "Hello " + name + " from " + city;
}
console.log(greet("Ada", "London"));Here, name and city are parameters.
