Created
September 11, 2022 09:17
-
-
Save buymed-hoangpham/fc4567a4247f29c3d8837ce4fde88a5b to your computer and use it in GitHub Desktop.
5
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 cars = [ | |
| { name: 'Ford', price: 200 }, | |
| { name: 'Nissan', price: 400 }, | |
| { name: 'Nissan', price: 600 }, | |
| ]; | |
| const showString = (car) => `${car.name} is ${car.price * 200} rupies`; | |
| const messages = cars.map((car) => showString(car)); | |
| console.log('🚀 ~ file: index.js ~ line 11 ~ messages ~ messages', messages); |
QuocCao-dev
commented
Sep 11, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment