아침마다 medium에서 메일이 오는데,,, 흥미로운 메일이 왔습니다

최근 프로젝트에서 모두 JS를 사용하는터라, 관심이 갈 수 밖에 없었는데, 읽으면 좋은 내용인 것 같아 공부할겸 번역해보려고합니다.
ES2023에서 도입되는 기능은 다음과 같습니다.
sort/splice같은 많은 방법이 있습니다.const array = [3, 2, 1];
const sortedArray = array.sort();
console.log(sortedArray);
// [1, 2, 3]
console.log(array);
// 원본배열도 정렬됩니다.
// [1, 2, 3]
const array = [3, 2, 1];
const sortedArray = array.toSorted();
console.log(sortedArray);
// [1, 2, 3]
console.log(array);
// The original array keep [3, 2, 1]
T.prototype.toReversed() -> T
T.prototype.toSorted(compareFn) -> t
T.prototype.toSpliced(start, deleteCount, ...items) -> T
T.prototype.with(index, value) -> T
const array = [1, 2, 3];
const newArray = array.with(1, false);
console.log(newArray);
// [1, false, 3]
console.log(array);
// 원본배열은 유지 [1, 2, 3]
const array = [{a: 1, b: 1}, {a: 2, b: 2}, {a: 3, b: 3}, {a: 4, b: 4}]
console.log(array.findLast(n => n)); //result -> {a: 4,b: 4 }
console.log(array.findLast(n => n.a * 5 === 20)); // result -> {a:4,b:4} as the condition is true so it returns the last element.
console.log(array.findLastIndex(n => n.a * 5 === 21)); // result -> -1 as the condition is not justified for returning the last element.
const weak = new WeakMap();
weak.set(Symbol('symbol1'), {});
#!/bin/bash
#!/usr/bin/python
#!/usr/bin/perl
#!/usr/bin/php
#!은 2Byte의 Magic Number로 OS에게 이 스크립트를 실행할 프로그램의 경로를 지정합니다.#!/usr/bin/env node
// in the Script Goal
'use strict';
console.log(2*3);
#!/usr/bin/env node
// in the Module Goal
export {};
console.log(2*2);
ES2023 is Here, Hurry Up to Learn
What's new in ES2023?
Uinx/Linux: Shebang
Shebang (Unix)
좋은 글 감사합니다. 자주 방문할게요 :)