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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T17:21:38+00:00 2026-06-04T17:21:38+00:00

I have been toying around with obfuscating Javascript with just brackets and other symbols,

  • 0

I have been toying around with obfuscating Javascript with just brackets and other symbols, as per this question and this automatic generator – for purely educational reasons, may I say 🙂

For example, evaluating (![]+[])[+!+[]] gives me the letter "a".

However, it seems that the examples rely on [].sort.call() returning the window object. My problem is that whenever this doesn’t seem to work on any of the browsers I have installed (Chrome 14, FF 9, IE 9):

//They told me this would return the window object
[].sort.call() 

//But I get an exception instead:
"TypeError: Array.prototype.sort called on null or undefined"

So I ask:

  • Was [].sort.call() fixed on recent browsers or does it still return the window object and its just me doing something wrong?
  • If it is the case that I can’t use this approach anymore, are there any other ways I can access the window object using only brackets, parenthesis, exclamation marks and the + operators?
  • 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-04T17:21:39+00:00Added an answer on June 4, 2026 at 5:21 pm

    This was changed with ECMAScript 5. From 15.3.4.4:

    NOTE The thisArg value is passed without modification as the this value. This is a change from Edition 3, where a undefined or null thisArg is replaced with the global object and ToObject is applied to all other values and that result is passed as the this value.

    …and sort() calls ToObject on that this value, throwing the TypeError exception.

    And, given the addition of strict mode, which further reduces access to the global object, your options are probably few. Though, without "use strict", you might try using this.

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

Sidebar

Related Questions

I have a scenario that I haven't been able to solve: I'm toying around
I have been trying to wrap my head around this issue for the past
I have been trying to wrap my head around this for a while now
I'm fairly new to Android and have been toying around with Canvas. I'm attempting
I have been trying to get my head around this but it hasn't been
I have been trying to wrap my head around why this is happening but
Ok, I have been trying to wrap my head around this http live streaming.
I have been toying around with creating soap servers in Delphi then running and
So lately I have been toying around with how Mathematica's pattern matching and term
I have been trying to play around with this for a long time and

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.