Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/JSON/stringify/15.12.3-11-26.js

raw
1 // Copyright (c) 2012 Ecma International. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 es5id: 15.12.3-11-26
6 description: >
7 JSON.stringify - the last element of the concatenation is ']' (The
8 abstract operation JA(value) step 10.b.iii)
9 ---*/
10
11 var arrObj = [];
12 arrObj[0] = "a";
13 arrObj[1] = "b";
14 arrObj[2] = "c";
15
16 var jsonText = JSON.stringify(arrObj, undefined, "").toString();
17
18 assert.sameValue(jsonText.charAt(jsonText.length - 1), "]", 'jsonText.charAt(jsonText.length - 1)');