코드 :
function remove_character(str, char_pos)
{
part1 = str.substring(0, char_pos);
part2 = str.substring(char_pos + 1, str.length);
return (part1 + part2);
}
console.log(remove_character("Python",0));
console.log(remove_character("Python",3));
console.log(remove_character("Python",5));
결과 :
ython
Pyton
Pytho
등록된 댓글이 없습니다.