Created
September 11, 2022 09:01
-
-
Save buymed-hoangpham/2e12b6dc046967a70f4058f06b81eab0 to your computer and use it in GitHub Desktop.
3
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
| const products = [ | |
| { name: 'Iphone', price: 200 }, | |
| { name: 'Motorola', price: 70 }, | |
| { name: 'Samsung', price: 150 }, | |
| { name: 'Sony', price: 98 }, | |
| { name: 'Windows pone', price: 10 }, | |
| ]; | |
| const result = products.map( | |
| (product) => `Name: ${product.name} Price. - Price: ${product.price}$` | |
| ); | |
| result.forEach((item) => console.log(item)); |
QuocCao-dev
commented
Sep 11, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment