haikuwebkit/JSTests/es6/String.prototype_methods_St...

11 lines
165 B
JavaScript

function test() {
return typeof String.prototype.endsWith === 'function'
&& "foobar".endsWith("bar");
}
if (!test())
throw new Error("Test failed");