Blog Archives

Sublime 3 projects: jshint me that

Getting your Sublime 3/SublimeLinter/SublimeLinter-jshint-combination to apply your (project) specific jshintrc-configuration… don’t forget to edit the executable’s path: { "folders": [ { "path": ".", "follow_symlinks": true } ], "settings": { "tab_size": 2, "SublimeLinter.linters.eslint.disable": true, "SublimeLinter.linters.jshint.disable": false, "SublimeLinter.linters.jshint.executable": [ "/your/specific/path/to/jshint" ], "SublimeLinter.linters.jshint.args":

Tagged with: , ,
Posted in Development, JavaScript

Understanding JavaScript’s scopes

Sometimes, I see odd JavaScript-code, like this:

1
2
3
4
5
6
7
8
9
// declares var "i":
for (var i=0; i<2; i++) {
    // ...
}
 
// redeclares var "i":
for (var i=0; i<2; i++) {
    alert("I don't understand JavaScript's scopes");
}

The author of this code (obviously) didn’t really understand JavaScript’s scoping rules.

Tagged with: , ,
Posted in JavaScript