tobym76

JS-mapper-snippet

Nov 24th, 2018
566
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const cities = ['Torino', 'London', 'Dubai', 'London', 'Edinburgh'];
  2.  
  3. const uppercaseCities = cities.map(city => city.toUpperCase());
  4.  
  5. console.log(uppercaseCities);
  6. // [ 'TORINO', 'LONDON', 'DUBAI', 'LONDON', 'EDINBURGH' ]
  7.  
  8. //taken from https://github.com/matteo-hertel/FPTalk
Advertisement
Add Comment
Please, Sign In to add comment