Ask questions, find answers and collaborate at work with Stack Overflow for Teams. Explore Teams Collectives™ on Stack Overflow Find centralized, trusted content and collaborate around the technologies you use most. Learn more about Collectives

気になったら即調べるが吉、ということで。 数値→文字列 var num = 123; // わかりやすい String(num); // "123" num.toString(10); // "123" // この用途では使ったこと無い num.toFixed() // "123" // なるほど num + ''; // "123" 文字列→数値 var str = '123'; // わかりやすい Number(str); // 123 parseInt(str, 10); // 123 parseFloat(str); // 123 // なるほど str - 0; // 123 str * 1; // 123 str / 1; // 123 // すっきりやけど知らん人は読めない +str; // 123 -(-str); // 123 ~~str; // 123 str&-1;
標準組み込みオブジェクトStringコンストラクターString() コンストラクター静的メソッドString.fromCharCode()String.fromCodePoint()String.raw()インスタンスメソッドString.prototype[@@iterator]()String.prototype.anchor() 非推奨 String.prototype.at()String.prototype.big() 非推奨 String.prototype.blink() 非推奨 String.prototype.bold() 非推奨 String.prototype.charAt()String.prototype.charCodeAt()String.prototype.codePointAt()String.prototype.concat()String.proto
標準組み込みオブジェクトStringコンストラクターString() コンストラクター静的メソッドString.fromCharCode()String.fromCodePoint()String.raw()インスタンスメソッドString.prototype.anchor() 非推奨 String.prototype.at()String.prototype.big() 非推奨 String.prototype.blink() 非推奨 String.prototype.bold() 非推奨 String.prototype.charAt()String.prototype.charCodeAt()String.prototype.codePointAt()String.prototype.concat()String.prototype.endsWith()String.prototyp
Standard built-in objectsStringConstructorString() constructorStatic methodsString.fromCharCode()String.fromCodePoint()String.raw()Instance methodsString.prototype.anchor() Deprecated String.prototype.at()String.prototype.big() Deprecated String.prototype.blink() Deprecated String.prototype.bold() Deprecated String.prototype.charAt()String.prototype.charCodeAt()String.prototype.codePointAt()String
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015. Learn moreSee full compatibilityReport feedback indexOf() は String 値のメソッドで、この文字列を検索し、指定した部分文字列が最初に出現するインデックスを返します。 オプションで開始位置を取り、指定した数値以上のインデックスで指定した部分文字列が最初に出現するインデックスを返します。 const paragraph = "I think Ruth's dog is cuter than your dog!"; const searchTerm = "dog
標準組み込みオブジェクトStringコンストラクターString() コンストラクター静的メソッドString.fromCharCode()String.fromCodePoint()String.raw()インスタンスメソッドString.prototype.anchor() 非推奨; String.prototype.at()String.prototype.big() 非推奨; String.prototype.blink() 非推奨; String.prototype.bold() 非推奨; String.prototype.charAt()String.prototype.charCodeAt()String.prototype.codePointAt()String.prototype.concat()String.prototype.endsWith()String.prot
Standard built-in objectsStringConstructorString() constructorStatic methodsString.fromCharCode()String.fromCodePoint()String.raw()Instance methodsString.prototype.anchor() Deprecated String.prototype.at()String.prototype.big() Deprecated String.prototype.blink() Deprecated String.prototype.bold() Deprecated String.prototype.charAt()String.prototype.charCodeAt()String.prototype.codePointAt()String
Standard built-in objectsStringConstructorString() constructorStatic methodsString.fromCharCode()String.fromCodePoint()String.raw()Instance methodsString.prototype.anchor() Deprecated String.prototype.at()String.prototype.big() Deprecated String.prototype.blink() Deprecated String.prototype.bold() Deprecated String.prototype.charAt()String.prototype.charCodeAt()String.prototype.codePointAt()String
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く