Es6-methods-tostring

提供:Dev Guides
移動先:案内検索

ES6-StringメソッドtoString()

このメソッドは、指定されたオブジェクトを表す文字列を返します。

構文

string.toString()

戻り値

指定されたオブジェクトを表す文字列を返します。

var str = "Apples are round, and Apples are Juicy.";
console.log(str.toString( ));

出力

Apples are round, and Apples are Juicy.