📜  检查单词是否有重音或无重音 javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:20.380000             🧑  作者: Mango

代码示例3
var accentArray = ["á","à","ã","â","é","è","ê","í","ì","î","õ","ó","ò","ô","ú","ù","û"]
var stringToCheck = "áeiou"

for(var i=0; i < stringToCheck.length; i++){
    for(var j=0; j < accentArray.length; j++){
        if(stringToCheck[i] === accentArray[j]){
            alert("String has accents!");
        }
    }
}