Skip to content

Commit f3c066e

Browse files
committed
Refactor code
- Single argument lambdas - Remove duplicate example - Reorder and rename examples
1 parent ad3dda1 commit f3c066e

5 files changed

Lines changed: 4 additions & 22 deletions

File tree

JavaScript/8-adder.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
const adder = (a) => {
3+
const adder = a => {
44
const value = () => a;
55
const add = b => adder(a + b);
66
return { add, value };
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
const adder = (a) => ({
3+
const adder = a => ({
44
value() {
55
return a;
66
},

JavaScript/a-adder.js

Lines changed: 0 additions & 18 deletions
This file was deleted.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
'use strict';
22

3-
const adder = (a) => {
3+
const adder = a => {
44
let onZerro = null;
55
const obj = {};
66
const value = () => a;
7-
const add = (b) => {
7+
const add = b => {
88
let x = a + b;
99
if (x < 0) {
1010
x = 0;

0 commit comments

Comments
 (0)