Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9300389
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T22:46:09+00:00 2026-06-18T22:46:09+00:00

Please assume ‘use strict’; and also assume that, JSLint is on and errors cannot

  • 0

Please assume ‘use strict’; and also assume that, JSLint is on and errors cannot be ignored.

I find operators and ‘,’ initiated lists so much more readable,

e.g.:

var i = 0
    , j = 1
    , someLongVariablename1
    , someLongVariablename2
    , someLongVariablename3
    , someLongVariablename4;

 if( (
     'dcr' === cmd
      && (action)
      && ('get' === actionHttp || 'post' === actionHttp )
      && whatever
   ) { ... }

Hence my question:
Is “Bad Line Breaking” obsolete with “use strict”?

EDITED: ‘use strict’; will not prevent the execution of bad line breaking the code. It can prevent the execution of some kinds of errors.

I see that JSLint and JSHint treat bad line breaking differently. JSHint is much friendlier towards the syntax I prefer.

So that, may be a solution for others who are working on this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T22:46:10+00:00Added an answer on June 18, 2026 at 10:46 pm

    Unfortunately, strict mode doesn’t disable the horror that is automatic semicolon insertion, and so “bad” line breaks remain an issue. For example:

    (function() {
      "use strict";
    
      console.log(foo());
    
      function foo() {
        var a = 1, b = 2;
    
        return
        a + b;
      }
    })();
    

    Live Example | Source (you need to open the console and look at it)

    That still logs undefined rather than 3, because ASI kicks in and adds a semicolon after the return in foo.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Please assume that I do not need to worry about development time and costs:
I want to use the ASP.NET MVC 4 Bundling and Minification feature, please assume
Ok first, please assume that this is the first time I will be writing
let's say I have a code as a following: object[hash].init(); Please assume that hash
Questions about Python's subprocess.Popen() objects (Please assume a scenario where the number of bytes
Please assume the following contrived JavaScript: function do_something() { var x = 5; function
I am looking for a step-by-step Mercurial guide for iPhone projects . Please assume:
Updated: Please assume, I will have exactly 4 elements in my version number x.x.x.x
Please assume the following: public static void main(String[] args) { ThreadPoolExecutor pool = new
Please assume a resource managing class, let's say template<typename AddressFields> class AddressBook { std::list<AddressBookEntry<AddressFields>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.