Computer Science, asked by muzzu3776, 1 year ago

How do I replace a character at a particular index in JavaScript?

Answers

Answered by MohamedYaseen
0

I have a string, let's say Hello world and I need to replace the char at index 3. How can I replace a char by specifying a index?

var str = "hello world";

I need something like

str.replaceAt(0,"h");

Similar questions