I've been checking the lastIndexOf() method. Can someone explain the fourth case? The result is a bit strange, it shouldn't be -1 right?
let study = "javascript";
console.log(study.length); // 10
// search chr only
console.log(study.lastIndexOf('t')); // 9; 't' is found at index 9
console.log(study.lastIndexOf('v')); // 2; 'v' is found at index 2
console.log(study.lastIndexOf()); // -1; [empty] is not found
console.log(study.lastIndexOf("")); // 10; [nothing] is found at index 10, strange result
console.log(study.lastIndexOf(" ")); // -1; space is not found