Skip to content

Instantly share code, notes, and snippets.

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