Phương thức toSource() của Array trả về chuỗi mã nguồn tạo ra mảng (chỉ hỗ trợ Firefox/SpiderMonkey, non-standard).
Ví dụ
<html>
<head>
<title>JavaScript Array toSource Method</title>
</head>
<body>
<script>
var arr = new Array("football", "baseball", "volleyball", "cricket");
var str = arr.toSource();
document.write("Returned string: " + str);
</script>
</body>
</html>