Comment

Comment by WithTeeth

Cool idea, but kind of ironic that the example you used produces unnecessarily complicated stack overflow solutions. A JavaScript "contains" function is as simple as:

var contains = function (needle, haystack) { return haystack.indexOf(needle) !== -1 }

parent WithTeeth 10 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton