From d4a89e8d0e91ee9a2a1238905054b2f233da5e29 Mon Sep 17 00:00:00 2001 From: Anonymous-dev-v <83170790+Anonymous-dev-v@users.noreply.github.com> Date: Tue, 5 Apr 2022 22:45:13 +0300 Subject: [PATCH] Update task3.js --- js-tasks/task3.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js-tasks/task3.js b/js-tasks/task3.js index f3d66c5..ce87a45 100644 --- a/js-tasks/task3.js +++ b/js-tasks/task3.js @@ -1,5 +1,5 @@ const map = (fn, array) => array.map((el) => fn(el)) - +//here also function square(x) { return x * x; } // возведение в квадрат -console.log(map(square, [1, 2, 3, 4])); // [1, 4, 9, 16] \ No newline at end of file +console.log(map(square, [1, 2, 3, 4])); // [1, 4, 9, 16]