about | help | code help+videos | done | prefs |
Write a method that accepts an array of integers and returns the same array but with all of the negative elements replaced with the opposite value. arrayAbs([5, -3, 6, -7]) → [5, 3, 6, 7] arrayAbs([0, -2, -4, -8]) → [0, 2, 4, 8] arrayAbs([9, -4, -5, 6, 0]) → [9, 4, 5, 6, 0] ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 250
Copyright Nick Parlante 2017 - privacy