Skip to content
This repository was archived by the owner on Jan 3, 2023. It is now read-only.

Js core 2/week 3/berhane #75

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
reading list project completed
  • Loading branch information
bireworld committed Jul 16, 2020
commit 259f736039bc7645211344fc080ba14935aed6ed
21 changes: 20 additions & 1 deletion Week-1/Homework/projects/2-reading-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,23 @@ If you read it, log a string like 'You already read "The Hobbit" by J.R.R. Tolki

**/

let books = [];
let books = [
{ title:"Atomic Habits",
author:"James CLean",
alreadyRead: true},
{
title: "12 Rules of Life",
author: "Jordan B Peterson",
alreadyRead: false},
{
title: "Philosophy Who needs it",
author: "Ayn Rand",
alreadyRead: true
}];
for (let i = 0; i<books.length;i++){
if(books[i].alreadyRead===true){
console.log(`You already read ${books[i].title} by ${books[i].author}`)
}else{
console.log(`You still need to read ${books[i].title} by ${books[i].author}`)
}
}