Why isn't my splice() function working?

I’m trying to make a small function to get comfortable with (and to stop confusing splice, and slice.). According to w3Schools .splice() takes 3 arguments, (index at which to begin adding/removing elements, # of elements to be removed, and what to add.). Why does this function not work? P.S. Ignore they y, its just there as part of my experimenting.

let x = "Hello I like milk";
let y = '';

if(x[0] !== '(') {
 x = x.split(' ').splice(0, 0, '(');
 
   
}






console.log(x)

The Array.prototype.splice() method returns an array containing the deleted elements. Due you code delete 0 elements, this returns a empty array. The splice method mutates the array, then:

x = x.split(' ');
x.splice(0, 0, '(');
console.log(x);