filmov
tv
JavaScript Array with() Method (new in ES 2023)
Показать описание
What's with the new with() method on JavaScript arrays?
with() is new in ECMAScript 2023, also known as ES 14, which is the standard for JavaScript.
In this video, we look at how to replace an element in an array. Using the bracket syntax mutates the original array. Using with() instead creates a new array with the changed element, treating the original array as immutable.
with() is a great choice when working in applications that support immutable patterns such as state management libraries and functional programming techniques.
*Links*
Includes information on setting up Angular to support ES 2023 features.
*Content*
00:00 Array with() method
00:34 Replacing an Element in an Array
02:08 Array with() method is immutable
03:02 with() supported in ES 2023 and TypeScript 5.2
03:59 The with() method and negative indexes
04:30 Chaining with the with() method
05:03 Wrap Up
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
😊About Me
Hey! I'm Deborah Kurata
I'm a software developer and YouTube content creator. I speak at conferences such as VS Live and ng-conf. I write articles for freeCodeCamp. And I'm a Pluralsight author with courses in the top 10 most popular (out of 7,000+) over the past 5 years. For my work in support of software developers, I've been recognized with the Microsoft Most Valuable Professional (MVP) award, and I'm a Google Developer Expert (GDE).
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
#javascript #with #withmethod #es14 #es2023
with() is new in ECMAScript 2023, also known as ES 14, which is the standard for JavaScript.
In this video, we look at how to replace an element in an array. Using the bracket syntax mutates the original array. Using with() instead creates a new array with the changed element, treating the original array as immutable.
with() is a great choice when working in applications that support immutable patterns such as state management libraries and functional programming techniques.
*Links*
Includes information on setting up Angular to support ES 2023 features.
*Content*
00:00 Array with() method
00:34 Replacing an Element in an Array
02:08 Array with() method is immutable
03:02 with() supported in ES 2023 and TypeScript 5.2
03:59 The with() method and negative indexes
04:30 Chaining with the with() method
05:03 Wrap Up
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
😊About Me
Hey! I'm Deborah Kurata
I'm a software developer and YouTube content creator. I speak at conferences such as VS Live and ng-conf. I write articles for freeCodeCamp. And I'm a Pluralsight author with courses in the top 10 most popular (out of 7,000+) over the past 5 years. For my work in support of software developers, I've been recognized with the Microsoft Most Valuable Professional (MVP) award, and I'm a Google Developer Expert (GDE).
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
#javascript #with #withmethod #es14 #es2023
Комментарии