Warning: mkdir(): No space left on device in /var/www/tgoop/post.php on line 37

Warning: file_put_contents(aCache/aDaily/post/frontendInterview/--): Failed to open stream: No such file or directory in /var/www/tgoop/post.php on line 50
Frontend Interview - собеседования по Javascript / Html / Css@frontendInterview P.3788
FRONTENDINTERVIEW Telegram 3788
Set.isSubsetOf()

Метод isSubsetOf() сравнивает текущую коллекцию с другой и возвращает true, если все элементы указанной коллекции находятся так же в другой коллекции, и false — если нет.

Пример
Имеется два массива чисел. Определим входят ли все элементы первого массива так же и во второй массив. Для решения этой задачи, создадим из массивов Set-объекты и сравним их используя метод isSubsetOf():

const array1 = [ 34, 42, 0, -8 ]
const array2 = [ -8, 0, 1, 2, 16, 34, 42 ]

const set1 = new Set(array1)
const set2 = new Set(array2)

console.log(set1.isSubsetOf(set2))
// true
console.log(set2.isSubsetOf(set1))
// false


Поддержка метода isSubsetOf() в основных браузерах и в Node.js появилась в 2024 году. Если попробуете использовать метод в более ранних версиях, это приведёт к ошибке.

👉 @frontendInterview
👍41



tgoop.com/frontendInterview/3788
Create:
Last Update:

Set.isSubsetOf()

Метод isSubsetOf() сравнивает текущую коллекцию с другой и возвращает true, если все элементы указанной коллекции находятся так же в другой коллекции, и false — если нет.

Пример
Имеется два массива чисел. Определим входят ли все элементы первого массива так же и во второй массив. Для решения этой задачи, создадим из массивов Set-объекты и сравним их используя метод isSubsetOf():

const array1 = [ 34, 42, 0, -8 ]
const array2 = [ -8, 0, 1, 2, 16, 34, 42 ]

const set1 = new Set(array1)
const set2 = new Set(array2)

console.log(set1.isSubsetOf(set2))
// true
console.log(set2.isSubsetOf(set1))
// false


Поддержка метода isSubsetOf() в основных браузерах и в Node.js появилась в 2024 году. Если попробуете использовать метод в более ранних версиях, это приведёт к ошибке.

👉 @frontendInterview

BY Frontend Interview - собеседования по Javascript / Html / Css




Share with your friend now:
tgoop.com/frontendInterview/3788

View MORE
Open in Telegram


Telegram News

Date: |

It’s easy to create a Telegram channel via desktop app or mobile app (for Android and iOS): As of Thursday, the SUCK Channel had 34,146 subscribers, with only one message dated August 28, 2020. It was an announcement stating that police had removed all posts on the channel because its content “contravenes the laws of Hong Kong.” Developing social channels based on exchanging a single message isn’t exactly new, of course. Back in 2014, the “Yo” app was launched with the sole purpose of enabling users to send each other the greeting “Yo.” When choosing the right name for your Telegram channel, use the language of your target audience. The name must sum up the essence of your channel in 1-3 words. If you’re planning to expand your Telegram audience, it makes sense to incorporate keywords into your name. The creator of the channel becomes its administrator by default. If you need help managing your channel, you can add more administrators from your subscriber base. You can provide each admin with limited or full rights to manage the channel. For example, you can allow an administrator to publish and edit content while withholding the right to add new subscribers.
from us


Telegram Frontend Interview - собеседования по Javascript / Html / Css
FROM American