Skip to content

Commit

Permalink
add default value for parameter in functions
Browse files Browse the repository at this point in the history
  • Loading branch information
gravataLonga committed Aug 2, 2022
1 parent 9e025e6 commit b639354
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,17 @@ var say = function say(name) {
}
```

We also could declare default values for parameters

```
function add (a, b = 20) {
return a + b;
}
add(10);
add(10, 30);
```

### Builtin Functions
There are severals builtin functions that you can use:

Expand Down

0 comments on commit b639354

Please sign in to comment.