Open mserykh opened 3 years ago
/ lists every 3rd number between 1-20 and prints it to the console : used a function expression with an aggregate parameter as an argument for the loop to print every 3rd integer up to but not including 20/
const oddPrint = aggregate =>{
!aggregate ? console.error("input is required") : true;
for(let a = 1; a <= aggregate; a++) (a % 3 === 0)? console.log(a) : false;
}
oddPrint();
Assignment
Loop an Array
Instructions
Create a program that lists every 3rd number between 1-20 and prints it to the console.
Rubric