Loading ...
Sorry, an error occurred while loading the content.

2193Re: conversion to string

Expand Messages
  • Joe
    May 3 10:07 AM
    • 0 Attachment
      --- In jslint_com@yahoogroups.com, "Merlin" <g7awz@...> wrote:
      >
      >
      >
      > --- In jslint_com@yahoogroups.com, "Joe" <josephjoaquinmartin@> wrote:
      > > I have started getting jslint errors for the following:
      > >
      > > var stuff = 123;
      > > var stuffStr = 123 + "";
      >
      > > Error:
      > > Problem at line 2 character 22: Expected 'String' and instead saw ''''.
      > > var stuffStr = 123 + "";
      > >
      > > This seems like relatively new behavior, is it on purpose or a jslint parsing bug?
      >
      > It is relatively new behavior and it is on purpose.
      >
      > The recommended usage is:
      >
      > var stuff = 123;
      > var stuffStr = String(stuff);
      >
      > Harry.
      >

      Is there a switch to turn this check off?
    • Show all 4 messages in this topic