about | help | code help+videos | done | prefs |
Write a method that returns the array 'nums' but with all of the negative numbers replaced with a zero. Look at the test data for examples. test2023_01_19_APP1SLHL_replaceNegs([5, 3, 2, 1, 7, 8, 4]) → [5, 3, 2, 1, 7, 8, 4] test2023_01_19_APP1SLHL_replaceNegs([-2, 17, -5, 21, 23]) → [0, 17, 0, 21, 23] test2023_01_19_APP1SLHL_replaceNegs([-1, -2, -3, -4, -5, -6]) → [0, 0, 0, 0, 0, 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: 220
Copyright Nick Parlante 2017 - privacy