From 23aa5c1b24b2b6222f7c2154bc96920df37c7896 Mon Sep 17 00:00:00 2001 From: karishmarajput Date: Sun, 31 Oct 2021 13:42:43 +0530 Subject: Add ch-122 solution in js --- challenge-122/karishma/js/ch-1.js | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 challenge-122/karishma/js/ch-1.js diff --git a/challenge-122/karishma/js/ch-1.js b/challenge-122/karishma/js/ch-1.js new file mode 100644 index 0000000000..c6be964b11 --- /dev/null +++ b/challenge-122/karishma/js/ch-1.js @@ -0,0 +1,6 @@ +let input = [10,20,30,40,50]; +let sum = 0; +for (let j = 1; j <= 5; j++) { + sum += input[j-1]; + console.log(sum/j); +} \ No newline at end of file -- cgit