// // Utilities // // 本題ではないので読み飛ばしてOKです. // /** * 引数に渡した値を文字列にして返します. */ function tostring(obj) { if (typeof obj == 'undefined') { return '<undefined>'; } else if (typeof obj == 'null') { return '<null>'; } else if (typeof obj == 'object') { var text = ""; for (var name in obj) { if (text != "") { text += ", "; } else { text += "{"; } text += name + ":" + tostring(obj[name]); } text = text + "}";