Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Imperative code
- const cities = ['Torino', 'London', 'Dubai', 'London', 'Edinburgh'];
- const uppercaseCities = [];
- for (let city of cities) {
- uppercaseCities.push(city.toUpperCase());
- }
- console.log(uppercaseCities);
- // [ 'TORINO', 'LONDON', 'DUBAI', 'LONDON', 'EDINBURGH' ]
- //taken from Matteo Hertel's slides at https://github.com/matteo-hertel/FPTalk
Advertisement
Add Comment
Please, Sign In to add comment