Skip to content

Instantly share code, notes, and snippets.

@Prajwalprakash3722
Created September 15, 2022 08:38
Show Gist options
  • Save Prajwalprakash3722/4d0ab52d25743ef1a7e4200530130b98 to your computer and use it in GitHub Desktop.
Save Prajwalprakash3722/4d0ab52d25743ef1a7e4200530130b98 to your computer and use it in GitHub Desktop.
const arr = [1, 2, 3, 4, 5];
const newArr = arr.map((element) => {
return element * 2;
});
console.log(newArr);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment