Files
JavaScript-from-Beginner-to…/Chapter 5/Exercise 5.3
T
2021-11-24 19:37:14 +05:30

10 lines
199 B
Plaintext

const myWork = [];
for (let x = 1; x < 10; x++) {
let stat = x % 2 ? true : false;
let temp = {
name: `Lesson ${x}`, status: stat
};
myWork.push(temp);
}
console.log(myWork);