doc: ported old doc example for Array#toJSON

This commit is contained in:
tjcrowder 2009-09-07 13:02:46 +01:00 committed by Tobie Langel
parent d9f0a15dd5
commit e98c87d681
1 changed files with 5 additions and 0 deletions

View File

@ -319,6 +319,11 @@ Array.from = $A;
* Array#toJSON() -> String
*
* Returns a JSON string representation of the array.
*
* ### Example
*
* ['a', {b: null}].toJSON();
* //-> '["a", {"b": null}]'
**/
function toJSON() {
var results = [];