Skip to content

Instantly share code, notes, and snippets.

@mirajehossain
Last active June 20, 2018 17:00
Show Gist options
  • Save mirajehossain/ee6f8916311d9620f4baa13b4312c14a to your computer and use it in GitHub Desktop.
Save mirajehossain/ee6f8916311d9620f4baa13b4312c14a to your computer and use it in GitHub Desktop.
let numbers = [1,2,3,4,5,6,7,8,9];
let newNumbers = numbers.map(function(item){
return item+5;
});
console.log(newNumbers);
/// OUTPUT: [6, 7, 8, 9, 10, 11, 12, 13, 14]
/**
* আরো সহজ ভাবে es6 এ অ্যারো ফাংশন ব্যবহার করে
* লিখাযায়
**/
let numbers = [1,2,3,4,5,6,7,8,9];
let newNumbers = numbers.map(item=> item+5);
console.log(newNumbers);
/// OUTPUT: [6, 7, 8, 9, 10, 11, 12, 13, 14]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment