Created
November 28, 2022 19:31
-
-
Save appoll/3cb5cc81acbe10fb36265b00f4acc337 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// E5 - same like E3, but books are in an array now | |
// 5.1 Use a for loop to decrease the price of all books in the array to half of their original price | |
// 5.2 Use a for loop to convert all books' authors' last name to lowercase | |
// .toLower() | |
// 5.3 Use a for loop to convert all books' authors' last name to uppercase | |
// .toUpper() | |
// 5.4 Use a for loop to increase the price of all books written in german by 10 percent | |
let b1 = { | |
title: "Gone with the wind", | |
price: 30, | |
currency: "EUR" | |
} | |
let b2 = { | |
title: "The godfather", | |
price: 40, | |
currency: "USD" | |
} | |
// this comes from the database | |
let books = [b1, b2]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment