Given the value of a variable ,write a statement ,without using if construct ,which will produce the absolute Value of the variable
Answers
Answered by
8
let counter = 0;
arrayOfIntegers.forEach((integer) => {
const remainder = Math.abs(integer % 2);
counter += remainder;
});
console.log(counter);
Similar questions
English,
5 months ago
English,
5 months ago
Social Sciences,
5 months ago
Business Studies,
11 months ago