toStringintermediate// Get string representation of an object
const obj = { a: 1 }
obj.toString() // β '[object Object]'
Object.prototype.toString.call([]) // β '[object Array]'Use toString() to convert an object to a string; calling it via Object.prototype.toString.call() reveals the internal type tag.
Calling Object.prototype.toString.call([]) returns "[object Array]", which is more reliable than typeof for detecting arrays.
Challenge: Use the toString type-tag pattern to detect different built-in types.