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

204Re: Eval... LOL !

Expand Messages
  • montago_2004
    Aug 27 4:10 AM
    • 0 Attachment
      --- In jslint_com@yahoogroups.com, "Douglas Crockford" <douglas@...>
      wrote:
      >
      > --- In jslint_com@yahoogroups.com, "montago_2004" <mdk@> wrote:
      > >
      > > --- In jslint_com@yahoogroups.com, "Douglas Crockford" <douglas@>
      > > wrote:
      > > >
      > > > --- In jslint_com@yahoogroups.com, "montago_2004" <mdk@> wrote:
      > > > > try this :
      > > > >
      > > > > var p = "eval";
      > > >
      > > > You can turn that off with the Tolerate eval option.
      > > >
      > >
      > > Don't you see the error ???
      > > Or do I have to spell it for you ?
      > >
      > > var p = "e"+"v"+"a"+"l"; //which also report 'Eval is Evil'
      > >
      > > It's a string !, its harmless :-D
      >
      > There is no reason to put eval in a string except to evade an eval
      > restriction, so JSLint is doing its job.
      >

      var Explain = "You should be aware that eval might occur in non-script
      context"

      //that eval might be a token in a parser
      switch(token)
      {
      //....
      case "eval" : break;
      //....
      }

      /*
      And that eval isn't evil, when you use it right.
      */

      var ObjCopy = eval( OrgObj.toSource() );
    • Show all 6 messages in this topic