💾obj.isIterable
array.isIterable, // true
object.isIterable, // false
(3).isIterable, // falseObject.defineProperties(Object.prototype, {
// ⭐️ obj.isIterable
isIterable: {
get() {
// ⭐️ code copied from the chat bot "chatGPT"
return typeof this[Symbol.iterator] === 'function';
}
},
}Last updated