DD2480-G9 / metrics-graphics

A library optimized for concise and principled data graphics and layouts.
http://metricsgraphicsjs.org
Mozilla Public License 2.0
0 stars 0 forks source link

Requirement: Use block-scoped functions #4

Closed BK239 closed 6 years ago

BK239 commented 6 years ago

Use block-scoped functions when applicable. I.e. instead of

(function () {
    var foo = function () { return 1; }
    // foo() == 1
    (function () {
        var foo = function () { return 2; }
        // foo() == 2
    })();
    // foo() == 1
})();

use

{
    function foo () { return 1; }
    // foo() == 1
    {
        function foo () { return 2; }
        // foo() == 2
    }
    // foo() == 1
}
RickardBjorklund commented 6 years ago

No longer needed since assignment 3 is done!