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 8541025
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T11:44:00+00:00 2026-06-11T11:44:00+00:00

JavaScript1.7 error in GoogleChrome Example: var x, y; try { [x, y] = [1,

  • 0

JavaScript1.7 error in GoogleChrome

Example:

var x, y;
try {
 [x, y] = ["1", "2"];
 document.write(x+": "+y);
} catch(e){
 console.log(e);
}

catch erro:
Invalid left-hand side in assignment JavaScript1.7

I need actually is to test if the browser supports javascript1.7

What I need is to actually test if the browser supports javascript1.7
But without using this kind of code:

jsversion = 1.7;

This code beyond invalid by the w3c, is also working with global variables,
which can be a very bad thing (can cause conflicts and other problems)

I tried using the following code (but error occurs in “strict”)

var i=0;
try{
    yield i;
} catch(ee) {
    document.write(ee);
}

So this is what I need to do, to test if the browser supports javascript1.7.

Thanks.

  • 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-11T11:44:01+00:00Added an answer on June 11, 2026 at 11:44 am

    Try

    var isESNext;
    try {
      eval('(function () { var x, y; [x, y] = [1, 2]; })()');
      isESNext = true;
    } catch (ex) {
      isESNext = false;
    }
    

    This uses eval to parse a bit of code which uses ES.next pattern decomposition but which is not valid EcmaScript 5. The rest of the code which declares and assigns isESNext is valid EcmaScript 3 code though so should run on all browsers.

    The problem you’re running into is due to Chapter 16:

    16 Errors

    An early error is an error that can be detected and reported prior to the evaluation of any construct in the Program containing the error. An implementation must report early errors in a Program prior to the first evaluation of that Program.

    …

    An implementation must treat any instance of the following kinds of errors as an early error:

    • Any syntax error.

    But the code snippet above gets around the early error because

    Early errors in eval code are reported at the time eval is called

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

Sidebar

Related Questions

I use this code, but javascript is not loading. var head = document.getElementsByTagName('head')[0]; var
Is there an equivalent to Firefox's Error console in other browsers? I find the
The error When the user opens http://sync.aws.af.cm/ , the Google Chrome JavaScript Console shows
Here is a question in JavaScript below: // Tested via Google Chrome console. var
I have getting a javascript error when attempting to reference an object in a
I'm getting a javascript error. It has to do with this section of code:
I have a javascript error that occurs on my site, Im pretty sure I
I have a problem with a javascript error: $(#slider) is undefined How can i
How do I make Firefox pop up something on every Javascript error? I don't
I noticed that an application I am maintaining was giving me a javascript error

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.