2261Re: [jslint] Re: option.type
- Jun 5, 2011Douglas Crockford <douglas@...> wrote on Mon, 6 Jun 2011
at 01:18:59 -0000 in <ish9u3+tj8c@...>:
> Has anyone tried the new type consistency checking?This consequence appears to be undesirable:
> Has anyone found it to be useful?
Problem at line 1 character 34: Type inconsistency: string and number.
var mixed="The value is three ("+3+")";
An oversimplified example, but it's common to mix strings and numbers
together knowing that the numbers will be converted to string.
Also true for strings + booleans. It seems to fire on a lot of
debugging statements in my code.
- << Previous post in topic Next post in topic >>