From 0a48a96b86209a54d1689225bc0b9cc951bb9c85 Mon Sep 17 00:00:00 2001 From: Jean Benitez Date: Sat, 20 Oct 2018 18:53:18 -0500 Subject: [PATCH 1/2] ch2 JEAN BENITEZ --- ch2/index.js | 1 + 1 file changed, 1 insertion(+) create mode 100644 ch2/index.js diff --git a/ch2/index.js b/ch2/index.js new file mode 100644 index 0000000..f3e3c3d --- /dev/null +++ b/ch2/index.js @@ -0,0 +1 @@ +export const ch2 = num => (num + '').length < 6 && (num + '').padStart(5, 0); \ No newline at end of file From b428841e46b4e536b27ad4a04d6db3f8828933ab Mon Sep 17 00:00:00 2001 From: Jean Benitez Date: Sat, 20 Oct 2018 19:03:36 -0500 Subject: [PATCH 2/2] fix arg --- ch2/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ch2/index.js b/ch2/index.js index f3e3c3d..12db67e 100644 --- a/ch2/index.js +++ b/ch2/index.js @@ -1 +1 @@ -export const ch2 = num => (num + '').length < 6 && (num + '').padStart(5, 0); \ No newline at end of file +export const ch2 = s => s.length < 6 && s.padStart(5, 0);