function startsWith(input, string) { return input.indexOf(string) === 0; } console.log(startsWith('js string exercises', 'js'));