How can I insert a string at a specific index of another string?
var txt1 = \"foo baz\"
Suppose I want to insert \"bar \" after the \"foo
Inserting at a specific index (rather than, say, at the first space character) has to use string slicing/substring:
var txt2 = txt1.slice(0, 3) + "bar" + txt1.slice(3);