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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T20:03:38+00:00 2026-06-09T20:03:38+00:00

If you put }!{ in your JavaScript console in Chrome, as a result you

  • 0

If you put }!{ in your JavaScript console in Chrome, as a result you will get false.

Why don’t we get an error?

  • 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-09T20:03:40+00:00Added an answer on June 9, 2026 at 8:03 pm

    The reason for this behaviour is because Chrome wraps anything you enter into the console with another piece of code.

    The code it wraps with (at the time of writing) is as follows:

    with ((window && window.console && window.console._commandLineAPI) || {}) {
        // Your code here.
    }
    

    Entering }!{ closes the code block brace, and makes a new (negated) object at the end.

    As you can see for youself in the console !{} returns false.


    I went through quite a lengthy investigative process to find the answer to this, my original comments are preserved below

    Original Answer:

    Just a theory; I imagine the code entered in the console being called inside a function

    function execUserCode() { code }

    What you’re doing is creating

    function execUserCode() { }!{ }

    The console is returning the last result, which is actually !{ } = false


    Edit:

    Lots of comments about how this is probably wrong. I agree. It’s just a theory.

    I like these kind of puzzles so I had a dig through the Chromium source, it’s a bit much for me but I’ll leave some pointers in case anyone else has a stab.

    The JS console is called the “inspector” and can be found here:

    chromium/src/third_party/WebKit/Source/WebCore/inspector/

    I’ve been looking at inspector/front-end/ConsoleView.js and I think I found a bit of where the user code is executed.

    evaluateUsingTextPrompt: function(expression, showResultOnly)
    {
        this._appendCommand(expression, this.prompt.text, false, showResultOnly);
    },
    

    The reason!

    Little brainwave. I did this in the console

    > myEval = eval
    > eval = function(str) { console.log(str); myEval(str) }
    > }!{
    

    Result:

    with ((window && window.console && window.console._commandLineAPI) || {}) {
    }!{
    }
    

    I was close, but now we have the answer 🙂

    The code is generated in chromium/src/third_party/WebKit/Source/WebCore/inspector/InjectedScriptSource.js currently around line 440.

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

Sidebar

Related Questions

In Android it causes HUGE issues if you don't put all of your UI
I have the following code, and the javascript console in chrome says Can't read
Put this in your location bar in IE javascript:location.href='http://www.google.com/search?q=something&lt=bar' Watch in horror as it
I'm not sure if you put your web services in a seperate project but
There are two options when setting up your JBPM session. You can put your
iPhone forms, where do you put your validation? People suggested me to directly put
Put on your c++ ninja voodoo gloves. We purchased a 3rd party library to
I made register form where you have to put in all your personal info.
I'm trying to put together a layout using Bootstrap that resembles your typical OS
for example lets say your pulling data from somewhere and you put it in

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.