Comment

Comment by EnigmaticLion

> "test".indexOf("st") == "test".length - "st".length

I don't think this is a correct implementation of "endsWith".

"testtest".indexOf("st") =/= "testtest".length - "st".length

parent EnigmaticLion 10 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton