Created
September 11, 2022 09:10
-
-
Save buymed-hoangpham/159c0548fd70ce28110cba9f2b7bffbb to your computer and use it in GitHub Desktop.
4
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 paintings = [ | |
| { name: 'Mona lisa', width: 200, height: 200 }, | |
| { name: 'The scream', width: 400, height: 600 }, | |
| { name: 'The last supper', width: 600, height: 700 }, | |
| ]; | |
| const messages = paintings.reduce((acc, cur) => { | |
| acc.push(`The ${cur.name} is ${cur.width} x ${cur.height}`); | |
| return acc; | |
| }, []); | |
| console.log('🚀 ~ file: index.js ~ line 11 ~ messages ~ messages', messages); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment