

JSFuck - Write any JavaScript with 6 Characters: []()!+
source link: http://www.jsfuck.com/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Write any JavaScript with 6 Characters: []()!+
JSFuck
()+
[]!
JSFuck is an esoteric and educational programming style based on the atomic parts of JavaScript. It uses only six different characters to write and execute code.
It does not depend on a browser, so you can even run it on Node.js.
Use the form below to convert your own script. Uncheck "eval source" to get back a plain string.
Links
- Share on Twitter
- View source on GitHub
- Follow @aemkei (Martin Kleppe)
- Original discussion at Sla.ckers.org
Alternatives
- Hieroglyphy (8 chars, browser only)
- utf-8.jp (broken)
- JS-NoAlnum (broken)
Basics
- false => ![]
- true => !![]
- undefined => [][[]]
- NaN => +[![]]
- 0 => +[]
- 1 => +!+[]
- 2 => !+[]+!+[]
- 10 => [+!+[]]+[+[]]
- Array => []
- Number => +[]
- String => []+[]
- Boolean => ![]
- Function => []["filter"]
- eval => []["filter"]["constructor"]( CODE )()
- window => []["filter"]["constructor"]("return this")()
See the full list here.
Recommend
-
66
Dwitter is a social network for building and sharing visual javascript demos limited to 140 characters. See the impressive creations crammed into so few characters, and play around with your own code!
-
30
You can write basically any JavaScript program on the planet using just these characters: []()!+ This is a well-known trick, but not that many developers know how it actually works. Today, we're gonna...
-
9
Read/Write UTF-8 characters in C++, in Windows. (Note : Add <meta http-equiv='Content-Type' content='text/html; charset=utf-8' /> to your Markdown source so that UTF8 is properly rendered) Ab...
-
10
Regular Expressions are extremely powerful but their syntax can be pretty opaque. Today we’ll use regex to capture all content between two characters. Example Problem Setup Let’s say we have the following string: “Hi th...
-
12
Write fluently in any languageFluently is an online distraction-free editor with a translator, multilingual grammar checker, and synonym library built-in. Improve your writing in a foreign language.
-
7
5 Tips to Write Code Faster In Any Programming LanguageDouble your coding speed while keeping the quality of workHow to code fast, a cover designed by the author with Canva.Every programming-r...
-
8
⚡JS Tip: Create Emoji Characters in JavaScript using String.fromCodePoint(); Sep 16 ・1 min read...
-
2
Write Rock Solid Tests in Any Programming LanguageEvery software company wants to produce quality software that is trusted, meets the client demands and is delivered on time.Photo by
-
25
CEdit does not appear any special characters advertisements Why does CEdit control not display special characters e.g., ™ (...
-
11
I didn't write any Javascript, and other shortcuts
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK