var x = "fred"; if (x == " ") { // the string is a single space, not the empty string alert("x is a space"); } results in this error message: Error: Problem at...
As Described in ECMA-262 3rd Edition JSLint fails to support Rules for Variable names as laid out in section 7.3 on page 14-15 where... Identifier :: ...
I put a small shim in the JSLint Rhino edition to make it run identically on node.js: http://github.com/tsmith/jslint-node-edition With this you can run JSLint...
Just learned something new! This works in Rhino 1.7. See the line with the comment below. function assert(condition) { if (!condition) print('assertion...
... Thanks for explaining that! I think I've almost connected all the dots. function Foo() {} var foo = new Foo(); All of these line print "true" in Rhino: ...
I grabbed a copy of arrayextras.js from http://erik.eae.net/archives/2005/06/05/17.53.19/ so I could use the new ECMAScript 5 Array methods in ECMAScript 3...
... prototype is a property of a constructor function, it is not the property through which an object delegates to another object, which is the key to...
On Thu, Jul 29, 2010 at 3:50 PM, Douglas Crockford ... Thank you very much! That helped a lot! Can someone explain why the second line below outputs false? I...
... {} inherits from Object.prototype. Object inherits from Function.prototype because it is a function. A string inherits from String.prototype, which...
I'm a little confused about something that is pretty fundamental in JavaScript. I was thinking that Object is a prototype of every object. That doesn't seem to...
... Bert; You're making a bunch of assumptions about your code. In the future you might try to make some changes that will make your code wrong. Imagine in ...
I know that reversing the declaration order would fix the example code I posted. However the situation that caused to me run into this doesn't really allow...
Edward, Starting your reply with "These suggestions are all wrong." is rude, especially when they are not. Here is the original code, modified so JSLint likes...
Hi all! I've released an update to my jslint wrapper, jslint4java. The main change is that it can now produce JUnit XML output, enabling better integration...
These suggestions are all wrong. The problem here is when a variable invoked and defined. You can use: function foo () { bar(); } function bar () { var a =...
You could use: var foo, bar; foo = function () { bar(); }; bar = function () { foo(); }; Marcel ... -- Marcel Duran [Non-text portions of this message have...
Allright. But what if I have two functions that mutually call each other (that was when I ran into this)? Then there is always one that is 'encountered39; before...
JSLint wants you to define functions before their first call is encountered. While your code would work the way you haven't, it's considered better style to...
When linting this code: (function outer() { var foo = function() { bar(); }; var bar = function() { }; foo(); })(); JSLint gives me these warnings: Problem at...
Really! I heard talk about typeof being fixed. I guess they figured it would cause too many compatibility problems so they cut it? I also recall hearing about...
Even though it's not supported yet, I'd still like to understand something about how this is supposed to work. I understand I can include "use strict"; in a...
That is perfectly valid and acceptable. for (var i=0, j=9; i <= 9; i++, j--) document.writeln("a["+i+"]["+j+"]= " + a[i][j]); It is a standard for loop with...
... Not true. typeof remains broken. An Array.isArray method is added. ... Not exactly. this will be bound to undefined, which might result in throwing. ... ...