Question – how come you’re not plugging your hugely useful Lint-deployer Debug here? Simply not ready yet?
]]>@Jeffrey, agreed, I don’t think I really understood any of those diagrams – but he seems to really like them; he uses them in some of his presentations too.
@Daniel, I should’ve included that tagline – it is certainly true. The first time I used JSLint the results were not pretty! But, over time, it’s definitely made me a better JavaScript developer!
@Alex, don’t be intimidated; try to embrace JSLint! 🙂
@Pete, agreed, plus its implementation seems a little shallow in some areas. For example, it will throw an error with this:
for (var i in obj) { if (!obj.hasOwnProperty(i)) { continue; } doSomething(); } |
But not with this:
for (var i in obj) { if (obj.hasOwnProperty(i)) { doSomething(); } } |
… even though, effectively, they’re the same.
@Mathias, by “unexpected” I meant from the author’s perspective (i.e. the fictional person who wrote that function). Understandably, the ignorance of that fictional individual lead to him/her being unaware of the radix issue.
]]>I don’t mean to nitpick here, but… Indeed, parseInt('056') !== 56
, but how is this “unexpected behavior”?
If the string passed to the parseInt()
function begins with '0'
, and no radix parameter is given, the radix is implicitly set to 8
(octal).
If you want to parse decimal numbers, you need to use a radix of 10.
parseInt('056', 10) === 56
That doesn’t hurt my feelings, just makes me wonder if the tool itself is worth using.
]]>Highly recommended!
ps. quote: It may hurt your feelings 😛
]]>