質問編集履歴
1
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
のような、文字の長さが異なるものから
|
1
|
+
月5水3木2金1
|
2
|
+
水2木4
|
3
|
+
のような、文字の長さが異なるものから火2、水4のように抜き出すために、substrを使用したいと考え、MDN Web Docsを使って検索していたのですが、substrが非推奨となっていました。その根拠に、> probably won't be removed anytime soon, but it's defined in Annex B of the ECMA-262 standard, whose introduction states: "… Programmers should not use or assume the existence of these features and behaviours when writing new ECMAScript code. …"とあったので、リンクに飛んでみたのですが、リンク先にはそれらしい記述がありませんでした。なので、もし廃止されるのならその理由と、substrと同じように使える関数があれば教えてください。
|