Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F7540698
test_toString.cjs
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
test_toString.cjs
View Options
// Test Object.prototype.toString
console.log("Testing Object.prototype.toString:");
// Test with Atomics (has @@toStringTag)
console.log("Object.prototype.toString.call(Atomics):", Object.prototype.toString.call(Atomics));
// Test with other built-ins
console.log("\nOther types:");
console.log("Object.prototype.toString.call({}):", Object.prototype.toString.call({}));
console.log("Object.prototype.toString.call([]):", Object.prototype.toString.call([]));
console.log("Object.prototype.toString.call(function(){}):", Object.prototype.toString.call(function(){}));
console.log("Object.prototype.toString.call(42):", Object.prototype.toString.call(42));
console.log("Object.prototype.toString.call('hello'):", Object.prototype.toString.call("hello"));
console.log("Object.prototype.toString.call(true):", Object.prototype.toString.call(true));
console.log("Object.prototype.toString.call(null):", Object.prototype.toString.call(null));
console.log("Object.prototype.toString.call(undefined):", Object.prototype.toString.call(undefined));
// Test with custom @@toStringTag
console.log("\nCustom @@toStringTag:");
const custom = { "@@toStringTag": "MyCustomType" };
console.log("Object.prototype.toString.call(custom):", Object.prototype.toString.call(custom));
File Metadata
Details
Attached
Mime Type
application/javascript
Expires
Wed, Jun 17, 1:44 PM (1 d, 6 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
570496
Default Alt Text
test_toString.cjs (1 KB)
Attached To
Mode
rANT Ant
Attached
Detach File
Event Timeline
Log In to Comment