You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/* 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;
}
Assignment
Loop an Array
Instructions
Create a program that lists every 3rd number between 1-20 and prints it to the console.
Rubric
The text was updated successfully, but these errors were encountered: