Files
rust_browser/tests/external/js262/fixtures/array-isArray.js
Zachary D. Rowitsch 5bdbc87dfb Add Array.prototype, Array global, and 20 array methods
Wire arrays into the prototype chain (Array.prototype → Object.prototype),
add the Array global with isArray(), and implement callback-based methods
(map, forEach, filter, find, findIndex, some, every, reduce, reduceRight,
sort) plus simple methods (includes, lastIndexOf, reverse, shift, unshift).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 23:36:02 -05:00

8 lines
245 B
JavaScript

console.log(Array.isArray([]));
console.log(Array.isArray([1, 2, 3]));
console.log(Array.isArray({}));
console.log(Array.isArray("hello"));
console.log(Array.isArray(42));
console.log(Array.isArray(null));
console.log(Array.isArray(undefined));