Home

Strings.

let s = 'Megamachine' assert( s.lenght == 11 ) assert( s.indexOf( 'mach' ) == 4 ) assert( s.toUpperCase() == 'MEGAMACHINE' ) assert( s.toLowerCase() == 'megamachine' ) assert( s.slice( 4 ) == 'machine' ) assert( s.slice( -7 ) == 'machine' ) assert( s.slice( 4, 8 ) == 'mach' ) assert( s.slice( 0, 4 ) == 'Mega' ) assert( s[ 5 ] == 'a' ) assert( s.endsWith( 'ine' ) ) assert( s.startsWith( 'Meg' ) ) assert( typeof s === 'string' || s instanceof String )