Write a JavaScript program to remove a character at the specified position of a given string and return the new string
- برمجة جافاسكربت java script
- 2021-06-01
- ahmadghneem
الأجوبة
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));
أسئلة مشابهة
القوائم الدراسية التي ينتمي لها السؤال