次のようなテキストを置き換えようとしています。
I need the %r for the bike.
Where%r
は別の値に置き換えられます。
に置き換える%r
としましょう$$$$
。
var text = 'I need the %r for the bike.';
return text.replace("%r", "$$$$");
期待される結果を得る代わりに:
I need the $$$$ for the bike.
私は得る:
I need the $$ for the bike.
私がここに欠けているものはありますか?