asok14215

asok14215 asok14215

Niner since 2012

Comments

  • jQuery Events - 16

    There's some subtlety as to why the score variable can retain its value between clicks. I understand it because of my experience with C#, lambda expressions, and closures, but it might not be so obvious to the beginning programmer.

  • Understandi​ng Function versus Global Scope - 10

    I would have expected in the 2nd alert box to see that myScope was changed to "changed", but it remains "global".

    myScope = "global";
    
    (function () {
        myScope = "changed";
        var myScope = "function";
        alert('inside the function, the scope is: ' + myScope);
    })();
    
    alert('outside the function, the scope is: ' + myScope);

  • Writing JavaScript in Visual Web Developer Express Edition - 04

    I was a little surprised at first that breakpoints in the script weren't honored when I hit F5 in the dev environment. After thinking about it, I suspect that VS is debugging the server side and not the client side.