d
Amit DhamuSoftware Engineer
 

Insert Character At Position

1 minute read 00000 views
var string = 'jQuery is Cool'
var insert = 'VERY'
var position = '10'

var result = [
  string.slice(0, position),
  insert + ' ',
  string.slice(position),
].join('')

Source