4 lines
140 B
JavaScript
4 lines
140 B
JavaScript
|
function startsWith(input, string) {
|
||
|
return input.indexOf(string) === 0;
|
||
|
}
|
||
|
console.log(startsWith('js string exercises', 'js'));
|