Skip to content

Comment on You Can't JavaScript Under Pressure

Comments

Oh! Hello. This is my thing I made for usvsth3m.com. Hope y'all like it. HTML5 Webworkers made it possible - sandboxing user-submitted JavaScript so an accidental while(1) or document.write can't kill everything.

Do have a look at the source code. Oh, and try turning up your speakers and typing in the Konami code...

Oh, you, Tom Scott, made it? :D I'm a big fan.

A few suggestions, then:

1. Don't use i as the name of the parameter. A lot of people use that as the name of loop variables, and it means breaking habit or wasting time changing the name.

2. For test 3, try some multiple-extension files to make sure they did it right (some.file.multiple.extensions, should return "extensions")

3. For test 5, it says "integers". Try some non-integers during testing, to make sure that it's only checking for integers.

4. For test 5, it says "arrays". Try some objects to make sure they're not being lazy and using typeof thing === "object"

Anyway, thanks for making this. I love it!

If you alert() something inside an infinite loop it doesn't seem to be able to detect it (nor does it show an alert box!)

Nothing like figuring out another way to kill your browser :)

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.