Interview Questions

(function() {
   baz = 5;
   var bar = 10;
})();

console.log(baz);
console.log(bar);

Explain scoping in Javascript

(function() {
    var foo = 1;
    function bar() {
        var foo = 2;
    }
    bar();
    console.log(foo);
    if(true) {
        var foo = 3;
    }
    console.log(foo);
})();

console.log(foo)

Explain closures?

(function() {
    function foo(x) {
        var baz = 3;
        return function (y) {
        console.log(x + y + (++baz));
        }
    }
    var moo = foo(2);
    moo(1);
    moo(1);
})();

What is the difference between

“==” and “===”? 

"1"+2+4 = ?

How would do you target a specific Javascript/CSS bug in IE8

How would do you target a specific Javascript & CSS bug in

Android stock browser

- What does this code do?


- What is the difference between

these 3 different examples?

- Pros / Cons ?


 

deck

By Johan Borestad

deck

  • 254