mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-29 14:36:22 +00:00
26 lines
438 B
Markdown
26 lines
438 B
Markdown
|
---
|
||
|
id: dedc9e64-fe57-4c60-95b9-7df6201f4949
|
||
|
title: JavaScript Named parameters
|
||
|
---
|
||
|
|
||
|
# Introduction
|
||
|
|
||
|
Introduced with [ES6](20201030093404-es6)
|
||
|
|
||
|
# Syntax
|
||
|
|
||
|
``` javascript
|
||
|
function selectEntries({ start=0, end=-1, step=1 } = {}) {
|
||
|
console.log(start)
|
||
|
console.log(end)
|
||
|
console.log(step)
|
||
|
}
|
||
|
|
||
|
selectEntries()
|
||
|
```
|
||
|
|
||
|
# See also
|
||
|
|
||
|
- [Rest Operator (…) in Object
|
||
|
Destructuring](20201103111357-rest_operator_in_object_destructuring)
|