Try it online: https://baboures.github.io/tools/jsfuckr/
Features
- You can encode JavaScript using only six chars
([+<])
- It's a modification of JSFuck that uses
<
instead of!
How it works (see the full mapping or a step-by-step example)
// Primitives
'false': '([]<[])'
'true': '([]<[+[]])'
'undefined': '[][[]]'
'NaN': '+[[]<[]]'
'Infinity': '+([+([]<[+[]])]+(([]<[+[]])+[])[([]<[+[]])+([]<[+[]])+([]<[+[]])]+[+([]<[+[]])]+[+[]]+[+[]]+[+[]])' // +"1e1000"
// Constructors
'Array': '[]'
'Number': '(+[])'
'String': '([]+[])'
'Boolean': '([]<[])'
// Alpha
'a': '(([]<[])+[])[+([]<[+[]])]'
'd': '([][[]]+[])[([]<[+[]])+([]<[+[]])]'
'e': '(([]<[+[]])+[])[([]<[+[]])+([]<[+[]])+([]<[+[]])]'
'f': '(([]<[])+[])[+[]]'
'i': '([([]<[])]+[][[]])[+([]<[+[]])+[+[]]]'
'l': '(([]<[])+[])[([]<[+[]])+([]<[+[]])]'
'n': '([][[]]+[])[+([]<[+[]])]'
'r': '(([]<[+[]])+[])[+([]<[+[]])]'
's': '(([]<[])+[])[([]<[+[]])+([]<[+[]])+([]<[+[]])]'
't': '(([]<[+[]])+[])[+[]]'
'u': '([][[]]+[])[+[]]'
// Numbers in the range 0-9
0: +[]
1: +([]<[+[]])
2: ([]<[+[]])+([]<[+[]])
3: ([]<[+[]])+([]<[+[]])+([]<[+[]])
4: ([]<[+[]])+([]<[+[]])+([]<[+[]])+([]<[+[]])
5: ([]<[+[]])+([]<[+[]])+([]<[+[]])+([]<[+[]])+([]<[+[]])
6: ([]<[+[]])+([]<[+[]])+([]<[+[]])+([]<[+[]])+([]<[+[]])+([]<[+[]])
7: ([]<[+[]])+([]<[+[]])+([]<[+[]])+([]<[+[]])+([]<[+[]])+([]<[+[]])+([]<[+[]])
8: ([]<[+[]])+([]<[+[]])+([]<[+[]])+([]<[+[]])+([]<[+[]])+([]<[+[]])+([]<[+[]])+([]<[+[]])
9: ([]<[+[]])+([]<[+[]])+([]<[+[]])+([]<[+[]])+([]<[+[]])+([]<[+[]])+([]<[+[]])+([]<[+[]])+([]<[+[]])
// Numbers greater than 9
'10': +([]<[+[]])+[+[]]
'11': +([]<[+[]])+[+([]<[+[]])]
'12': +([]<[+[]])+[([]<[+[]])+([]<[+[]])]
'100': +([]<[+[]])+[+[]]+[+[]]
'123': +([]<[+[]])+[([]<[+[]])+([]<[+[]])]+[([]<[+[]])+([]<[+[]])+([]<[+[]])]
'314': ([]<[+[]])+([]<[+[]])+([]<[+[]])+[+([]<[+[]])]+[([]<[+[]])+([]<[+[]])+([]<[+[]])+([]<[+[]])]