Write a JavaScript function to insert a string within a string at a particular position code example
Example: js insert string at position
var a = "I want apple";
var b = " an";
var position = 6;
var output = [a.slice(0, position), b, a.slice(position)].join('');
console.log(output);