function solution(num) {
var answer = 0;
for(let i = 0; i<500; i++){
if(num!==1){
num = num % 2 === 0 ? num / 2 : num * 3 + 1
}else{
return i;
}
}return answer = -1;
}
function solution(seoul) {
var answer = '';
for(let i=0; i<=seoul.length; i++){
if(seoul[i] === "Kim") {
answer = "김서방은 "+i+"에 있다";
}
}
return answer;
}
// function solution(seoul) {
// return "김서방은 "+seoul.indexOf("Kim")+"에 있다";
// }