Skip to content

Commit 367e03a

Browse files
authored
Create Array.prototype.with.js
1 parent e661c9f commit 367e03a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Diff for: Array.prototype.with.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
const ages = [10, 15, 20, 25];
2+
3+
const newAges = ages.with(1, 16);
4+
console.log(newAges); // [10, 16, 20, 25]
5+
console.log(ages);

0 commit comments

Comments
 (0)