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

  • Home
  • SEARCH
  • 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 6789875
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T17:39:28+00:00 2026-05-26T17:39:28+00:00

var freebie = ‘ \ <div class=item’+last+’ data-type=psd data-visited=false> \ <div class=baseBubble /> \

  • 0
var freebie = ' \
    <div class="item'+last+'" data-type="psd" data-visited="false"> \
      <div class="baseBubble" /> \
      <div class="baseStroke" /> \
      <div class="baseThickerStroke" /> \
      <div class="thumbnail"> \
        <div class="overlay" /> \
        <img src="'+item['thumb'][0]+'" width="'+item['thumb'][1]+'" height="'+item['thumb'][2]+'" /> \
      </div> \
    </div>';

Does anyone know why this is returning 2 errors in JSLint?

Here’s an image of the 2 errors:

     enter image description here

  • 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-05-26T17:39:28+00:00Added an answer on May 26, 2026 at 5:39 pm

    Short answer, you need to configure JSLint to tolerate ECMAScript 5.

    This can be done with:

    /*jslint es5: true, all-your-other-jslint-options */
    

    Long answer:

    The sequence, \ followed by a line terminator, was not actually valid Javascript until recently (version 5, December 2009).

    From the previous iteration (version 3) of the ECMAScript (ECMA-262) standard, section 7.8.4 states: (with some irrelevant entries removed):

    StringLiteral ::
        " DoubleStringCharacters(opt) "
        ' SingleStringCharacters(opt) '
    
    SingleStringCharacters ::
        SingleStringCharacter SingleStringCharacters(opt)
    
    SingleStringCharacter ::
        SourceCharacter but not single-quote ' or backslash \ or LineTerminator
        \ EscapeSequence
    

    So the sequence you have ends up at that last line above, a single \ followed by the syntax element EscapeSequence. Examining that further:

    EscapeSequence ::
        CharacterEscapeSequence
        0 [lookahead ∉ DecimalDigit]
        HexEscapeSequence
        UnicodeEscapeSequence
    
    CharacterEscapeSequence ::
        SingleEscapeCharacter
        NonEscapeCharacter
    
    SingleEscapeCharacter :: one of
        ' " \ b f n r t v
    
    NonEscapeCharacter ::
        SourceCharacter but not EscapeCharacter or LineTerminator
    
    EscapeCharacter ::
        SingleEscapeCharacter
        DecimalDigit
        x
        u
    
    HexEscapeSequence ::
        x HexDigit HexDigit
    
    UnicodeEscapeSequence ::
        u HexDigit HexDigit HexDigit HexDigit 
    

    Since the next character after \ is neither 0, x or u, the only alternative is CharacterEscapeSequence which boils down to either SingleEscapeCharacter (not the case since the line terminator is not one of those characters listed ) or NonEscapeCharacter (which explicitly excludes the line terminator as a possibility).

    There’s also this note at the bottom of that section:

    NOTE: A ‘LineTerminator’ character cannot appear in a string literal, even if preceded by a backslash . The correct way to cause a line terminator character to be part of the string value of a string literal is to use an escape sequence such as \n or \u000A.


    Now, ECMAScript 5 changed that a little. Starting from there, they modified the definition of SingleStringCharacter thus:

    SingleStringCharacter ::
        SourceCharacter but not one of ' or \ or LineTerminator
        \ EscapeSequence 
        LineContinuation
    
    LineContinuation ::
        \ LineTerminatorSequence
    

    and modified the note to be:

    NOTE: A line terminator character cannot appear in a string literal, except as part of a LineContinuation to produce the empty character sequence. The correct way to cause a line terminator character to be part of the String value of a string literal is to use an escape sequence such as \n or \u000A.

    And, rather than break JSLint for all the current scripts out there, the authors intelligently decided to make ECMAScript 5 support optional, requiring a change to the JSLint options to activate it. That way, it will only allow ECMAScript 5 if you explicitly tell it so.

    You can visit the http://www.jslint.com/ website and confirm this:

    Code:
        var xyzzy = ' \
        hello";
    Error:
        Problem at line 1 character 16: This is an ES5 feature.
    var xyzzy = ' \
        Problem at line 2 character 13: Unclosed string.
    hello";
        Problem at line 2 character 13: Stopping. (66% scanned).
    

    If you then scroll down to the flags section, there’s an entry for Tolerate ES5 syntax which will, when set, remove that error.

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

Sidebar

Related Questions

var htm = $.ajax({ type: GET, url: ./viewforms, async: false }).responseText; var myObject =
var array1 = {}; array1['one'] = new Array(); array1['one']['data'] = 'some text'; array1['one']['two'] =
var div1 = $(<div>); var div2 = $(<div>); var div3 = $(<div>); $('#container').html('').append(div1).append(div2).append(div3); What
var Box = function(){ this.parm = {name:rajakvk,year:2010}; Box.prototype.jspCall = function() { $.ajax({ type: post,
var carousel = jQuery('#mycarousel').data('jcarousel'); var index = carousel.size() + 1; carousel.size(index); var html =
var act = false; var newprod = prompt(tell me somthing, ); if (newprod !=
var $name = ('div#amuchlongername'); $('#wrapper').prepend('<div id=$name></div>'); Obviously I know this code is wrong lol,
var type = typeof(TInterface); var types = AppDomain.CurrentDomain.GetAssemblies().ToList() .SelectMany(s => s.GetTypes()) .Where(t => type.IsAssignableFrom(t));
var y=document.forms[form][user].value if (y==null || y== ) { alert(Username cannot be Blank); return false;
var i : integer; i := 1234567; Given the above, I want the string

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.