๐Ÿ’พobj.isIterable

JSโŸฉ iteration โŸฉ iterable โŸฉ extension โŸฉ obj.isIterable

Object.defineProperties(Object.prototype, {
    // โญ๏ธ obj.isIterable
    isIterable: {
        get() {
            // โญ๏ธ code copied from the chat bot "chatGPT"
            return typeof this[Symbol.iterator] === 'function';
        }
    },
}

Last updated

Was this helpful?