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

Eval... LOL !

Expand Messages
  • montago_2004
    try this : var p = eval ;
    Message 1 of 6 , Aug 23, 2008
    • 0 Attachment
      try this :


      var p = "eval";
    • Douglas Crockford
      ... You can turn that off with the Tolerate eval option.
      Message 2 of 6 , Aug 24, 2008
      • 0 Attachment
        --- In jslint_com@yahoogroups.com, "montago_2004" <mdk@...> wrote:
        > try this :
        >
        > var p = "eval";

        You can turn that off with the Tolerate eval option.
      • montago_2004
        ... 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
        Message 3 of 6 , Aug 25, 2008
        • 0 Attachment
          --- 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
        • Douglas Crockford
          ... There is no reason to put eval in a string except to evade an eval restriction, so JSLint is doing its job.
          Message 4 of 6 , Aug 25, 2008
          • 0 Attachment
            --- 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.
          • montago_2004
            ... 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
            Message 5 of 6 , Aug 27, 2008
            • 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() );
            • Douglas Crockford
              ... Like I said before, there is an option to turn that check off. I don t recommend it.
              Message 6 of 6 , Aug 27, 2008
              • 0 Attachment
                > //that eval might be a token in a parser
                > switch(token)
                > {
                > //....
                > case "eval" : break;

                Like I said before, there is an option to turn that check off.
                I don't recommend it.
              Your message has been successfully submitted and would be delivered to recipients shortly.