0

Function on arrays

Given arrary [[2,4],[6,8]] , i need to create function which divide every element by 2, and return a new array with the divided elements :[ [1,2],[3,4]] Guess i need to work with nested loops but i get stuck. please help me:)

19th Nov 2019, 11:08 PM
Dalia Smirnov
Dalia Smirnov - avatar
3 odpowiedzi
+ 2
Please show us your attempt!
19th Nov 2019, 11:17 PM
HonFu
HonFu - avatar
+ 2
1. Sepcify the language you're using in the tags 2. Please show us your attempts of how you tried to solve this problem, and where you were stuck exactly
19th Nov 2019, 11:17 PM
Aymane Boukrouh
Aymane Boukrouh - avatar
0
You don't need a nested loop, let us just start there.
20th Nov 2019, 1:00 AM
Avinesh
Avinesh - avatar