dcsimg
www.webdeveloper.com
Results 1 to 4 of 4

Thread: Should I use "strict" mode ?

  1. #1
    Join Date
    Sep 2015
    Posts
    63

    Should I use "strict" mode ?

    Should I use "strict" mode when developing javascript?

    If yes, why?
    If no, why?

  2. #2
    Join Date
    Mar 2007
    Location
    localhost
    Posts
    5,389
    IMHO no you will find that allot of things are not allowed in strict mode that are allowed under normal operation.

    I see no reason to stifle the language.
    --> JavaScript Frameworks like JQuery, Angular, Node <--
    ... and please remember to wrap code with forum BBCode tags:-

    [CODE]...[/CODE] [HTML]...[/HTML] [PHP]...[/PHP]

    If you can't think outside the box, you will be trapped forever with no escape...

  3. #3
    Join Date
    Mar 2011
    Posts
    124
    I rarely use it. You can read https://developer.mozilla.org/en-US/...ce/Strict_mode and decide for yourself when to use it. It can help if you need to write performant scripts for like a game. Just keep in mind that it only works from IE10+. Older browsers will run that script in standard mode, and will might behave unexpected.

  4. #4
    Join Date
    Sep 2015
    Posts
    63
    Thanks!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center