Typescript-string-tostring
提供:Dev Guides
TypeScript-ストリングtoString()
このメソッドは、指定されたオブジェクトを表す文字列を返します。
構文
戻り値
指定されたオブジェクトを表す文字列を返します。
例
コンパイル時に、JavaScriptで同じコードが生成されます。
その出力は次のとおりです-
このメソッドは、指定されたオブジェクトを表す文字列を返します。
string.toString( )
指定されたオブジェクトを表す文字列を返します。
var str = "Apples are round, and Apples are Juicy.";
console.log(str.toString( ));
コンパイル時に、JavaScriptで同じコードが生成されます。
その出力は次のとおりです-
Apples are round, and Apples are Juicy.