Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
文字列の入力を求めるプロンプトを表示し、入力された文字列にバックスラッシュ文字またはテルグ文字 ddha (U+0C22) が含まれているかどうかを警告するスクリプトの作成について、支援が必要です。
文字列のプロンプト:
var string = prompt("Enter a string");
バックスラッシュが含まれているかどうかを確認します。
string.match(/\\/)
テルグ文字が含まれているかどうかを確認します。
string.match(/\u0c22/)
一致が見つかった場合、matchメソッドは一致した文字を含む配列を返し、それ以外の場合は を返しnullます。
match
null