/
githubmirror
/
node
Обзор
Документация
Войти
/
githubmirror
/
node
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
deps/v8/test/mjsunit/destruct-array-spread-done.js
26 строк
483 B
Michaël Zasso
deps: update V8 to 8.7.220
15 ноя 2020, 18:46
Не верифицирован
15 ноя 2020, 18:46
48db20f
Код
Авторство
О чём код?
// Copyright 2020 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. 'use strict'; let called = 0 const it = { [Symbol.iterator]() { return this; }, next() { called += 1; return { value: 42, done: true, }; }, }; const [a, b, ...c] = it; assertEquals(called, 1); assertEquals(a, undefined); assertEquals(b, undefined); assertEquals(c.length, 0);