[javascript] Insert a string at a specific index

Here is a method I wrote that behaves like all other programming languages:

_x000D_
_x000D_
String.prototype.insert = function(index, string) {
  if (index > 0) {
    return this.substring(0, index) + string + this.substr(index);
  }

  return string + this;
};

//Example of use:
var something = "How you?";
something = something.insert(3, " are");
console.log(something)
_x000D_
_x000D_
_x000D_

Reference: