Files

34 lines
551 B
Markdown
Raw Normal View History

2018-10-12 15:37:13 -04:00
---
title: Write Concise Declarative Functions with ES6
---
# Write Concise Declarative Functions with ES6
2018-10-12 15:37:13 -04:00
---
## Problem Explanation
2018-10-12 15:37:13 -04:00
ES6 makes it easy, and fancy, to write declarative functions! In this lesson, you are tasked at changing the function to follow ES6 standards.
---
## Hints
### Hint 1
2018-10-12 15:37:13 -04:00
Get rid of the `function` keyword.
---
## Solutions
<details><summary>Solution 1 (Click to Show/Hide)</summary>
2018-10-12 15:37:13 -04:00
```javascript
const bicycle = {
gear: 2,
setGear(newGear) {
"use strict";
this.gear = newGear;
}
};
```
</details>