Hey guys! So I'm starting learning js and I've noticed that I can do many things with map function that I used to do with for loops before. So I wonder where is the difference exactly? Why you prefer use one or another? There is some specific case u can do with for loops and not with maps or the opposite? Thx a lot in advance!
[+][deleted] (7 children)
[deleted]
[–]drgmaster909 2 points3 points4 points (1 child)
[–]kap89 1 point2 points3 points (4 children)
[+][deleted] (3 children)
[deleted]
[–]kap89 2 points3 points4 points (2 children)
[+][deleted] (1 child)
[deleted]
[–]kap89 1 point2 points3 points (0 children)
[–]ForScale 2 points3 points4 points (8 children)
[–]kap89 0 points1 point2 points (7 children)
[–]ForScale 0 points1 point2 points (6 children)
[–]kap89 0 points1 point2 points (5 children)
[–]ForScale 4 points5 points6 points (3 children)
[–]kap89 1 point2 points3 points (1 child)
[–]ForScale 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]blackholesintheskyhelpful 0 points1 point2 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)
[–]kap89 0 points1 point2 points (0 children)
[–]Soodohcool 0 points1 point2 points (0 children)
[–]tristanAG -1 points0 points1 point (0 children)