mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:17:34 +00:00
LibJS: Add Array.prototype.toString()
This commit is contained in:
parent
2c4a5849f6
commit
a7b21ec0f4
3 changed files with 40 additions and 0 deletions
9
Libraries/LibJS/Tests/Array.prototype.toString.js
Normal file
9
Libraries/LibJS/Tests/Array.prototype.toString.js
Normal file
|
@ -0,0 +1,9 @@
|
|||
try {
|
||||
var a = [1, 2, 3];
|
||||
assert(a.toString() === '1,2,3');
|
||||
assert([].toString() === '');
|
||||
assert([5].toString() === '5');
|
||||
console.log("PASS");
|
||||
} catch (e) {
|
||||
console.log("FAIL: " + e);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue