News for hackers. Stuff that matters.
Re:You Can't JavaScript Under Pressure by tomscott on Thursday October 03, 2013 @10:18AM (#6489035)
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...

Re:You Can't JavaScript Under Pressure by TazeTSchnitzel on Sunday October 13, 2013 @05:10PM (#6544182)
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!

Re:You Can't JavaScript Under Pressure by JosephRedfern on Thursday October 03, 2013 @11:07AM (#6489401)
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!)
Re:You Can't JavaScript Under Pressure by Demiurge on Thursday October 03, 2013 @11:15AM (#6489465)
Nothing like figuring out another way to kill your browser :)