sort((a, b) => a.salary - b.salary); getItem() вернёт null.JSON.parse(null) // nullJSON.parse(localStorage.getItem("no_such_key")) // null div.style.display = 'none';div.style.display = 'block'; div.style.opacity while() socket_close() – всё. ${movie.professionText.replace(/ы$/, "")}const nobl = (str) => str.replace(/ы$/, "");
data.forEach((movie) => {
// ...
${nobl(movie.professionText)} .reverse()"Habr".split("").reverse().join("") // "rbaH" then() дружит с async / await. await это «синтаксический подсластитель», ожидающий разрешения промиса. Кто запрещает писать const f = async (n) => {
await new Promise((res) => setTimeout(res, n))
.then(() => console.log("OK"));
console.log("Have you seen OK above?");
}
f(1000);
массив.pop()