miscoded

the web is a hack

Subscribe to RSS feed

Posts tagged with "quiz"

Challenge: analyse how browsers enter US Airlines' membership website

, , ,

We recently investigated a bug report about this US Airways login form. Pressing enter to log in fails - but only in Opera. The question is why? Read on if you want to try to analyse the problem..

Read more...

5-part JS quiz (link)

, ,

Came across the blog post so, you think you know JavaScript? by Dmitry Baranovskiy. It's a pretty nice little 5-part quiz on JavaScript quirks. I admit I did have one wrong answer (the fourth one), what's your score?

Rather than just linking to it I'll explain all the examples and why exactly you get the result you do ... but not just yet smile I'll first let my dear readers dive in and take the quiz. Explanations will follow in comments (unless you all beat me to it, of course).

spot a subtle JS error here..

, , ,

The other day I ran into weird errors while editing the Y!Mail patch in browser.js. The whole thing stopped working, and it took me a while to see the problem. Can you see it?

// need to fake someMethod
Element.prototype.someMethod=function(){
    // faking someMethod here
}
// we also have an insertBefore problem so let's fix that too
(function(oF){
    // tweaking insertBefore here
})(Element.prototype.insertBefore);


What was wrong? Hats off if you can see it without running the code.. smile

Y!RegExp quiz

, , , ...

This snippet is brought to you by Yahoo!Japan blogs. Quiz of the day: what is the RegExp meant to do and why does it fail?

if(img.match(/(.[jJ][pP][eE]?[gG]|.[gG][iI][fF]|.[pP][nN][gG])/)) {
return true;
}
return false;


(Yes, the variable name is a hint.)