и посмотреть медиа
Tester | Interview Questions
и посмотреть медиа
Interview questions for testers.
Interview questions for testers.
AI bot for text-to-speech and voice cloning in Telegram. Create audio using neural network quickly and easily.
Testing questions: ISTQB, Selenium, API. With examples.
🤔 Что возвращает метод find index? Метод findIndex() используется для поиска индекса первого элемента массива, который удовлетворяет заданному условию. array.findIndex(callback(element, index, array)) 🚩Примеры использования Поиск первого чётного числа const numbers = [3, 7, 10, 15, 20]; const index = numbers.findIndex(num => num % 2 === 0); console.log(index); // 2 (10 - первое чётное число) Поиск объекта в массиве const users = [ { id: 1, name: "Анна" }, { id: 2, name: "Пётр" }, { id: 3, name: "Иван" } ]; const index = users.findIndex(user => user.name === "Пётр"); console.log(index); // 1 Если элемент не найден (-1) const arr = [5, 10, 15]; const index = arr.findIndex(num => num > 20); console.log(index); // -1 (нет чисел больше 20) Ставь 👍 и забирай 📚 Базу знаний
Открыть канал и посмотреть медиаOnly registered users can share their opinion.
Be the first to share your impression of this resource!