Меню
×
   ❮     
HTML CSS JAVASCRIPT SQL PYTHON JAVA PHP КАК СДЕЛАТЬ ПРОГРАММЫ SW3.CSS C C++ C# BOOTSTRAP REACT MYSQL JQUERY EXCEL XML DJANGO NUMPY PANDAS NODEJS R TYPESCRIPT ANGULAR GIT POSTGRESQL MONGODB ASP AI GO KOTLIN SASS VUE DSA GEN AI SCIPY AWS КИБЕРБЕЗОПАСНОСТЬ НАУКА О ДАННЫХ
     ❯   

JS Учебник


JS Версии


JS Объекты


JS Функции


JS Классы


JS Асинхронный


JS HTML DOM


JS Браузер BOM


JS Веб APIы


JS AJAX


JS JSON


JS или jQuery


JS Графика


JS Примеры


JS Рекомендация




JavaScript ECMAScript 2023


ECMAScript 2023

JavaScript Version Numbers

Old ECMAScript versions was named by numbers: ES5 and ES6.

From 2016, versions are named by year: ES2016, 2018, 2020 ...

The 14th edition, ECMAScript 2023, was published in June 2023.

New Features in ES2023


Warning

These features are relatively new.

Older browsers may need an alternative code (Polyfill)


JavaScript Array findLast() Method

ES2023 added the findLast() method that will start from the end of an array and return the value of the first element that satisfies a condition.

Example

const temp = [27, 28, 30, 40, 42, 35, 30];
let high = temp.findLast(x => x > 40);
Try it Yourself »

JavaScript Array findLastIndex() Method

The findLastIndex() method finds the index of the last element that satisfies a condition.

Example

const temp = [27, 28, 30, 40, 42, 35, 30];
let pos = temp.findLastIndex(x => x > 40);
Try it Yourself »

JavaScript Array toReversed() Method

ES2023 added the Array toReversed() method as a safe way to reverse an array without altering the original array.

The difference between the new toReversed() method and the old reverse() method is that the new method creates a new array, keeping the original array unchanged, while the old method altered the original array.

Example

const months = ["Jan", "Feb", "Mar", "Apr"];
const reversed = months.toReversed();
Try it Yourself »

JavaScript Array toSorted() Method

ES2023 added the Array toSorted() method as a safe way to sort an array without altering the original array.

The difference between the new toSorted() method and the old sort() method is that the new method creates a new array, keeping the original array unchanged, while the old method altered the original array.

Example

const months = ["Jan", "Feb", "Mar", "Apr"];
const sorted = months.toSorted();
Try it Yourself »

JavaScript Array toSpliced() Method

ES2023 added the Array toSpliced() method as a safe way to splice an array without altering the original array.

The difference between the new toSpliced() method and the old splice() method is that the new method creates a new array, keeping the original array unchanged, while the old method altered the original array.

Example

const months = ["Jan", "Feb", "Mar", "Apr"];
const spliced = months.toSpliced(0, 1);
Try it Yourself »


JavaScript Array with() Method

ES2023 added the Array with() method as a safe way to update elements in an array without altering the original array.

Example

const months = ["Januar", "Februar", "Mar", "April"];
const new = months.with(2, "March");
Try it Yourself »

#! JavaScript Shebang

A Shebang is a number sign and an exclamation mark (#!) at the beginning of a script:

#!/usr/bin/env node

The example above tells the operating system to use the node program to run the script.

Now, you can run JavaScript code with ./fileName.js instead of node fileName.js.

#! is also called sharp-exclamation, hashbang, pound-bang, or hash-pling.



×

Связаться с отделом продаж

Если вы хотите использовать услуги schoolsw3 как образовательное учреждение, команда или предприятие, отправьте нам электронное письмо:
sales@schoolsw3.com

Сообщить об ошибке

Если вы хотите сообщить об ошибке или внести предложение, отправьте нам электронное письмо:
help@schoolsw3.com

Schoolsw3 оптимизирован для обучения и подготовки. Примеры могут быть упрощены для улучшения чтения и обучения. Учебники, ссылки и примеры постоянно проверяются, чтобы избежать ошибок, но мы не можем гарантировать полную правильность всего контента.
При использовании Schoolsw3 вы соглашаетесь прочитать и принять наши условия использования,
политику использования файлов cookie и конфиденциальности.

Авторское право 1999- принадлежит Refsnes Data. Все права защищены. Schoolsw3 работает на SW3.CSS.