const arr = ['typescript', 'php', 'python', 'c', 'c#', 'c++'];
const fromIndex = arr.indexOf('c');
const toIndex = 1;
const element = arr.splice(fromIndex, 1)[0];
arr.splice(toIndex, 0, element);
console.log(arr);
/*
run:
["typescript", "c", "php", "python", "c#", "c++"]
*/