From 80b8d0f7fa514b697aa0a50953e65e0ecd1f6fa7 Mon Sep 17 00:00:00 2001 From: CanisMajor01 Date: Sat, 8 Jan 2022 20:37:52 +0300 Subject: [PATCH 1/2] feat: solution to reverse-int task --- src/index.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index 83dabdd87..9119ca02b 100644 --- a/src/index.js +++ b/src/index.js @@ -1,3 +1,10 @@ module.exports = function reverse (n) { - -} +let a = n.toString() +let b = a.split('') +let c = b.reverse() +let d = c.join('') +let e = parseFloat(e) + + +return (e); +} \ No newline at end of file From 37739b831d8de3ee7265ec487dd55571672fc690 Mon Sep 17 00:00:00 2001 From: CanisMajor01 Date: Sat, 8 Jan 2022 21:01:28 +0300 Subject: [PATCH 2/2] fix: corrected variable letter --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 9119ca02b..c5df04548 100644 --- a/src/index.js +++ b/src/index.js @@ -3,7 +3,7 @@ let a = n.toString() let b = a.split('') let c = b.reverse() let d = c.join('') -let e = parseFloat(e) +let e = parseFloat(d) return (e);