I have studied web-design. Now I want to improve my skills in front-end development. I am an enthusiastic, responsible and hard working IT person. I am able to work well both in a team environment as well as using own initiative. I am able to work well under pressure and adhere to strict deadlines. Proficient in HTML, CSS, JavaScript, and React. Seeking to join a dynamic team where I can utilize my skills to help drive the success of the organization.
CODEWARS: Return Negative. In this simple assignment you are given a number and have to make it negative. But maybe the number is already negative?
const array = [1, -5, 0, 0.12]
function makeNegative() {
for (let i = 0; i < array.length; i++) {
if (array[i] != 0 && array[i] > 0) {
array[i] = array[i] * -1;
}
}
return array;
}
makeNegative()