mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-25 21:16:21 +00:00
26 lines
455 B
Markdown
26 lines
455 B
Markdown
---
|
|
date: 2020-09-22
|
|
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)
|