오늘 배운 것
불린타입은 result같은 변수를 할당하지 않아도 true,false를 자동으로 나타내기 때문에 굳이 result 값을 넣을 필요가 없음.
function hasRepeatedCharacter(str) {
for (let i=0; i<str.length-1; i++){
for(let j=i+1; j<str.length; j++){
if(str[i]===str[j]){
return true
}
}
} return false
}
반복문 진짜 어렵다 복습 또 복습하자..