I posted this blog post yesterday and introduced this special JavaScript implementation method. Many people leave a message saying they don't understand it. I will give you a brief analysis. In fact, it uses the simple principle of JavaScript.
First, let's analyze what these characters are:
! = False
[] = Array
+ = Connector
() = Object Separator
Then how to implement various JavascriptCodeWhat about it? For example, how do we create a role?
Very simple :(! [] + []) [1]. See it. That is, equivalent to "false" [1], the second character of the false string.
Then someone asked me how to input 1? No 1 in false?
First, we need to know how to represent true, and how to represent true if false is used?
Simpler :! + [].
Then you will understand that true = 1.
That .. How do I express it ?... Of course it is true + true, that is! + [] +! + []
Some people asked, What should I do if some characters are not true or false?
You can refer to the code table described in the previous article for a one-to-one correspondence.
In fact, this mainly utilizes the flexible expressions in Javascript, which have high requirements on basic skills. You need to understand the values of various types of characters under various types of conversions, and then splice them together.
This technology .. It feels like a Trojan... I can't think of any other functions.