From 3466abd5303e61792260d03abfb9d7c384d28009 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=BE=D0=BB=D0=B0=D0=B9=20=D0=A4=D0=B8?= =?UTF-8?q?=D1=80=D1=81=D0=BE=D0=B2?= <Николай Фирсов> Date: Mon, 10 Oct 2016 21:43:20 +0500 Subject: [PATCH 1/3] sum --- index.js | 1 + math.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 48fd345..1871ffd 100644 --- a/index.js +++ b/index.js @@ -10,3 +10,4 @@ console.info(sum(63, 15)); console.info(sum('12', 7)); // 19 + diff --git a/math.js b/math.js index c749300..ee1696d 100644 --- a/math.js +++ b/math.js @@ -3,5 +3,6 @@ exports.isStar = true; exports.sum = function (a, b) { - // Реализуйте сложение в этой функции + + return (Number(a)+Number(b)); }; From c80a5a9bd663531e03647436840244a09e0a36d8 Mon Sep 17 00:00:00 2001 From: Firsov Kolya Date: Mon, 10 Oct 2016 22:12:20 +0500 Subject: [PATCH 2/3] sum fix --- math.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/math.js b/math.js index ee1696d..175d25c 100644 --- a/math.js +++ b/math.js @@ -3,6 +3,7 @@ exports.isStar = true; exports.sum = function (a, b) { - - return (Number(a)+Number(b)); + var sum; + sum = Number(a) + Number(b); + return (sum); }; From d13cbe899df777346977241640a3351d044242ea Mon Sep 17 00:00:00 2001 From: Firsov Kolya Date: Mon, 10 Oct 2016 22:21:02 +0500 Subject: [PATCH 3/3] sum fix fix --- math.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/math.js b/math.js index 175d25c..a6b1431 100644 --- a/math.js +++ b/math.js @@ -3,7 +3,5 @@ exports.isStar = true; exports.sum = function (a, b) { - var sum; - sum = Number(a) + Number(b); - return (sum); + return Number(a) + Number(b); };