function startsWith(haystack, needle) {
    if (haystack.length < needle.length) {
        return false;
    }
    if (haystack === needle) {
        return true;
    }
    for (var i = 0; i < needle.length; i++) {
        if (haystack[i] !== needle[i]) {
            return false;
        }
    }
    return true;
}
/**
 * Determines if haystack starts with needle.
 */
Determines if haystack starts with needle.
Determines if haystack starts with needle .
function startsWith(haystack, needle) {
    if (haystack.length < needle.length) {
        return false;
    }
    if (haystack === needle) {
        return true;
    }
    for (var i = 0; i < needle.length; i++) {
        if (haystack[i] !== needle[i]) {
            return false;
        }
    }
    return true;
}
function startsWith ( haystack , needle ) { if ( haystack . length < needle . length ) { return false ; } if ( haystack === needle ) { return true ; } for ( var i = 0 ; i < needle . length ; i ++ ) { if ( haystack [ i ] !== needle [ i ] ) { return false ; } } return true ; }
Determines if haystack starts with needle.
Determines if haystack starts with needle .