From 66a5baa61102dea1f7108f26e2bf3ca7b53d0f67 Mon Sep 17 00:00:00 2001 From: Nataly Moskalenko Date: Wed, 10 Mar 2021 16:49:48 +0200 Subject: [PATCH] feat: add function reverse --- src/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 83dabdd87..543423a9f 100644 --- a/src/index.js +++ b/src/index.js @@ -1,3 +1,4 @@ module.exports = function reverse (n) { - + let arr = parseInt(String(n).split('').reverse().join('')); + return arr; }