Typescript-string-tostring

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

TypeScript-ストリングtoString()

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

構文

string.toString( )

戻り値

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

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

コンパイル時に、JavaScriptで同じコードが生成されます。

その出力は次のとおりです-

Apples are round, and Apples are Juicy.