aaencode - Encode any JavaScript program to Japanese style emoticons (^_^)

aaencoded alert("Hello, JavaScript")

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
゚ω゚ノ= /`m´)ノ ~┻━┻   //*´∇`*/ ['_'];
 o=(゚ー゚)  =_=3;
 c=(゚Θ゚) =(゚ー゚)-(゚ー゚);
 (゚Д゚) =(゚Θ゚)= (o^_^o)/ (o^_^o);
(゚Д゚)={゚Θ゚: '_' ,゚ω゚ノ : ((゚ω゚ノ==3) +'_') [゚Θ゚] ,゚ー゚ノ :(゚ω゚ノ+ '_')[o^_^o -(゚Θ゚)] ,゚Д゚ノ:((゚ー゚==3) +'_')[゚ー゚] };
 (゚Д゚) [゚Θ゚] =((゚ω゚ノ==3) +'_') [c^_^o];
(゚Д゚) ['c'] = ((゚Д゚)+'_') [ (゚ー゚)+(゚ー゚)-(゚Θ゚) ];
(゚Д゚) ['o'] = ((゚Д゚)+'_') [゚Θ゚];
(゚o゚)=(゚Д゚) ['c']+(゚Д゚) ['o']+(゚ω゚ノ +'_')[゚Θ゚]+ ((゚ω゚ノ==3) +'_') [゚ー゚] + ((゚Д゚) +'_') [(゚ー゚)+(゚ー゚)]+ ((゚ー゚==3) +'_') [゚Θ゚]+((゚ー゚==3) +'_') [(゚ー゚) - (゚Θ゚)]+(゚Д゚) ['c']+((゚Д゚)+'_') [(゚ー゚)+(゚ー゚)]+ (゚Д゚) ['o']+((゚ー゚==3) +'_') [゚Θ゚];
(゚Д゚) ['_'] =(o^_^o) [゚o゚] [゚o゚];
(゚ε゚)=((゚ー゚==3) +'_') [゚Θ゚]+ (゚Д゚) .゚Д゚ノ+((゚Д゚)+'_') [(゚ー゚) + (゚ー゚)]+((゚ー゚==3) +'_') [o^_^o -゚Θ゚]+((゚ー゚==3) +'_') [゚Θ゚]+ (゚ω゚ノ +'_') [゚Θ゚];
 (゚ー゚)+=(゚Θ゚);
 (゚Д゚)[゚ε゚]='\\';
 (゚Д゚).゚Θ゚ノ=(゚Д゚+ ゚ー゚)[o^_^o -(゚Θ゚)];
(o゚ー゚o)=(゚ω゚ノ +'_')[c^_^o];
(゚Д゚) [゚o゚]='\"';
(゚Д゚) ['_'] ( (゚Д゚) ['_'] (゚ε゚+(゚Д゚)[゚o゚]+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ (゚ー゚)+ (゚Θ゚)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (゚Θ゚))+ (゚ー゚)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ (゚ー゚)+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) +(o^_^o))+ ((o^_^o) - (゚Θ゚))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) +(o^_^o))+ (゚ー゚)+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ (c^_^o)+ (゚Д゚)[゚ε゚]+(゚ー゚)+ ((o^_^o) - (゚Θ゚))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ (゚Θ゚)+ (c^_^o)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ (゚ー゚)+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (゚Θ゚))+ (゚ー゚)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (゚Θ゚))+ (゚ー゚)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ (゚ー゚)+ (゚Д゚)[゚ε゚]+(゚ー゚)+ (c^_^o)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ (゚Θ゚)+ ((o^_^o) - (゚Θ゚))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ (゚ー゚)+ (゚Θ゚)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) +(o^_^o))+ ((o^_^o) +(o^_^o))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ (゚ー゚)+ (゚Θ゚)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) - (゚Θ゚))+ (o^_^o)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ (゚ー゚)+ (o^_^o)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) +(o^_^o))+ ((o^_^o) - (゚Θ゚))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (゚Θ゚))+ (゚Θ゚)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) +(o^_^o))+ (c^_^o)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) +(o^_^o))+ (゚ー゚)+ (゚Д゚)[゚ε゚]+(゚ー゚)+ ((o^_^o) - (゚Θ゚))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ (゚Θ゚)+ (゚Д゚)[゚o゚]) (゚Θ゚)) ('_');

Line#1

 ゚ω゚ノ= /`m´)ノ ~┻━┻   //*´∇`*/ ['_'];
// the following is same as above :
 ゚ω゚ノ = undefined;
  • ゚ω゚ノ : a global variable.
  • /`m´)ノ ~┻━┻ / : a RegExp object.
  • /*´∇`*/ : an inline comment.
  • a property "_" is not defined in RegExp class.

Line#2

o=(゚ー゚)  =_=3;
// the following is same as above:
o = 3;
(゚ー゚) = 3;
_ = 3;
  • o,(゚ー゚), and _ are global variables.
    • Note: in (゚ー゚) is "U+FF70 HALFWIDTH KATAKANA-HIRAGANA PROLONGED SOUND MARK".

Line#3

c=(゚Θ゚) =(゚ー゚)-(゚ー゚);
// the following is same as above:
 c = 0;
  ゚Θ゚ = 0;     // will be overwrited at line#4
  • ( ゚ー゚) - ( ゚ー゚) #=> 3-3 #=> 0

Line#4

(゚Д゚) =(゚Θ゚)= (o^_^o)/ (o^_^o);
// the following is same as above:
 ゚Θ゚ = 1;    // overwrite
 ゚Д゚ = 1;    // will be overwrite at line#5
  • (o^_^o) #=> (3^3^3) #=> 3
  • (o^_^o)/(o^_^o) #=> 3/3 #=> 1

Line#5

(゚Д゚)={゚Θ゚: '_' ,゚ω゚ノ : ((゚ω゚ノ==3) +'_') [゚Θ゚] ,゚ー゚ノ :(゚ω゚ノ+ '_')[o^_^o -(゚Θ゚)] ,゚Д゚ノ:((゚ー゚==3) +'_')[゚ー゚] };
// the following is same as above
  ゚Д゚ = {
    " ゚Θ゚": "_",
    " ゚ω゚ノ": "a",
    " ゚ー゚ノ": "d",
    " ゚Д゚ノ": "e"
  };
  • ゚Д゚ is an object (hash).
  • property " ゚ω゚ノ"
    • (( ゚ω゚ノ == 3) + '_')[ ゚Θ゚ ] #=> (false+"_")[1] #=> "false_"[1] #=> "a"
  • property " ゚ー゚ノ"
    • ( ゚ω゚ノ+ '_')[o^_^o -( ゚Θ゚)] #=> (undefined+"_")[3 - 1] #=> "undefined_"[2] #=> "d"
  • property " ゚Д゚ノ"
    • (( ゚ー゚==3) +'_')[ ゚ー゚] #=> (true + "_")[3] #=> "true_"[3] #=> "e"

Line#6

 (゚Д゚) [゚Θ゚] =((゚ω゚ノ==3) +'_') [c^_^o];
// the following is same as above:
 ゚Д゚[1] = "f";
  • ( ゚Д゚) [ ゚Θ゚] #=> ゚Д゚[1]
  • (( ゚ω゚ノ==3) +'_') [c^_^o] #=> (false+"_")[0^3^3] #=> "false_"[0] #=> "f"

Line#7

(゚Д゚) ['c'] = ((゚Д゚)+'_') [ (゚ー゚)+(゚ー゚)-(゚Θ゚) ];
// the following is same as above:
 ゚Д゚["c"] = "c"; 
  • ( ゚ー゚)+( ゚ー゚)-( ゚Θ゚) #=> 3 + 3 - 1 #=> 5
  • (( ゚Д゚)+'_') #=> (( ゚Д゚).toString()+'_') #=> "[object Object]" + "_"
  • ((゚Д゚)+'_') [ (゚ー゚)+(゚ー゚)-(゚Θ゚) ] #=> "[object Object]_"[5] #=> "c"

Line#8

(゚Д゚) ['o'] = ((゚Д゚)+'_') [゚Θ゚];
// the following is same as above:
 ゚Д゚["o"] = "o";
  • (( ゚Д゚)+'_')[ ゚Θ゚] #=> "[object Object]_"[1] #=> "o"

Line#9

(゚o゚)=(゚Д゚) ['c']+(゚Д゚) ['o']+(゚ω゚ノ +'_')[゚Θ゚]+ ((゚ω゚ノ==3) +'_') [゚ー゚] + ((゚Д゚) +'_') [(゚ー゚)+(゚ー゚)]+ ((゚ー゚==3) +'_') [゚Θ゚]+((゚ー゚==3) +'_') [(゚ー゚) - (゚Θ゚)]+(゚Д゚) ['c']+((゚Д゚)+'_') [(゚ー゚)+(゚ー゚)]+ (゚Д゚) ['o']+((゚ー゚==3) +'_') [゚Θ゚];
// the following is same as above:
 ゚o゚ = "constructor";
  • ( ゚Д゚)['c'] #=> "c"
  • ( ゚Д゚)['o'] #=> "o"
  • ( ゚ω゚ノ +'_')[ ゚Θ゚] #=> "undefined"[1] #=> "n"
  • ( ゚ω゚ノ==3) +'_') [ ゚ー゚] #=> "false_"[3] #=> "s"
  • (( ゚Д゚) +'_') [( ゚ー゚)+( ゚ー゚)] #=> "[object Object]_"[3+3] #=> "t"
  • (( ゚ー゚==3) +'_') [ ゚Θ゚] #=> "true_"[1] #=> "r"
  • (( ゚ー゚==3) +'_') [( ゚ー゚) - ( ゚Θ゚)] #=> "true_"[3-1] #=> "u"
  • ( ゚Д゚)['c'] #=> "c"
  • (( ゚Д゚)+'_')[( ゚ー゚)+( ゚ー゚)] #=> "[object Object]_"[3+3] #=> "t"
  • ( ゚Д゚)['o'] #=> "o"
  • (( ゚ー゚==3) +'_') [ ゚Θ゚] #=> "true_"[1] #=> "r"

Line#10

(゚Д゚) ['_'] =(o^_^o) [゚o゚] [゚o゚];
  • (o^_^o)[ ゚o゚] [ ゚o゚] #=> 3["constructor"]["constructor"] #=> Number["constructor"] #=> Function
  • see also: Function

Line#11

(゚ε゚)=((゚ー゚==3) +'_') [゚Θ゚]+ (゚Д゚) .゚Д゚ノ+((゚Д゚)+'_') [(゚ー゚) + (゚ー゚)]+((゚ー゚==3) +'_') [o^_^o -゚Θ゚]+((゚ー゚==3) +'_') [゚Θ゚]+ (゚ω゚ノ +'_') [゚Θ゚];
// the following is same as above:
 ゚ε゚ = "return";
  • (( ゚ー゚==3) +'_') [ ゚Θ゚] #=> "true_"[1] #=> "r"
  • ( ゚Д゚) . ゚Д゚ノ #=> ゚Д゚[" ゚Д゚ノ"] #=> "e"
  • (( ゚Д゚)+'_')[( ゚ー゚) + ( ゚ー゚)] #=> "[object Object]_"[3+3] #=> "t"
  • (( ゚ー゚==3) +'_')[o^_^o - ゚Θ゚] #=> "true_"[3-1] #=> "u"
  • (( ゚ー゚==3) +'_')[ ゚Θ゚] #=> "true_"[1] #=> "r"
  • ( ゚ω゚ノ +'_') [ ゚Θ゚] #=> "undefined_"[1] #=> "n"

Line#12

 (゚ー゚)+=(゚Θ゚);
// the following is same as above:
 ゚ー゚ = 4;

Line#13

 (゚Д゚)[゚ε゚]='\\';
// the following is same as above:
 ゚Д゚["return"]='\\';

Line#14

 (゚Д゚).゚Θ゚ノ=(゚Д゚+ ゚ー゚)[o^_^o -(゚Θ゚)];
// the following is same as above:
 ゚Д゚[" ゚Θ゚ノ"] = "b";
  • ( ゚Д゚+ ゚ー゚)[o^_^o -( ゚Θ゚)] #=> "[object Object]4"[3-1] #=> "b"

Line#15

(o゚ー゚o)=(゚ω゚ノ +'_')[c^_^o];
// the following is same as above:
o ゚ー゚o = "u";
  • ( ゚ω゚ノ +'_')[c^_^o] #=> "undefined_"[0^3^3] #=> "undefined_"[0] #=> "u"

Line#16

(゚Д゚) [゚o゚]='\"';
// the following is same as above:
 ( ゚Д゚)["constructor"]='\"';

Line#17

(゚Д゚) ['_'] ( (゚Д゚) ['_'] (゚ε゚+ ... ) (゚Θ゚)) ('_');
Script string
 ゚ε゚+(゚Д゚)[゚o゚]+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ (゚ー゚)+ (゚Θ゚)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (゚Θ゚))+ (゚ー゚)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ (゚ー゚)+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) +(o^_^o))+ ((o^_^o) - (゚Θ゚))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) +(o^_^o))+ (゚ー゚)+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ (c^_^o)+ (゚Д゚)[゚ε゚]+(゚ー゚)+ ((o^_^o) - (゚Θ゚))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ (゚Θ゚)+ (c^_^o)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ (゚ー゚)+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (゚Θ゚))+ (゚ー゚)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (゚Θ゚))+ (゚ー゚)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ (゚ー゚)+ (゚Д゚)[゚ε゚]+(゚ー゚)+ (c^_^o)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ (゚Θ゚)+ ((o^_^o) - (゚Θ゚))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ (゚ー゚)+ (゚Θ゚)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) +(o^_^o))+ ((o^_^o) +(o^_^o))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ (゚ー゚)+ (゚Θ゚)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) - (゚Θ゚))+ (o^_^o)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ (゚ー゚)+ (o^_^o)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) +(o^_^o))+ ((o^_^o) - (゚Θ゚))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (゚Θ゚))+ (゚Θ゚)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) +(o^_^o))+ (c^_^o)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) +(o^_^o))+ (゚ー゚)+ (゚Д゚)[゚ε゚]+(゚ー゚)+ ((o^_^o) - (゚Θ゚))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ (゚Θ゚)+ (゚Д゚)[゚o゚]
// the following is same as above:
"return\"\141\154\145\162\164\50\42\110\145\154\154\157\54\40\112\141\166\141\123\143\162\151\160\164\42\51\""
// or
"return\"alert(\"Hello, JavaScript\")\""
  • ゚ε゚ #=> "return"
  • ( ゚Д゚)[ ゚o゚ ] #=> ゚Д゚["constructor"] #=> '\"'
  • ( ゚Д゚)[ ゚ε゚ ] #=> ゚Д゚["return"] #=> '\\'
  • (c^_^o) #=> 0
  • (゚Θ゚) #=> 1
  • ((o^_^o) - (゚Θ゚)) #=> 2
  • (o^_^o) #=> 3
  • (゚ー゚) #=> 4
  • ((゚ー゚) + (゚Θ゚)) #=> 5
  • ((o^_^o) +(o^_^o)) #=> 6
  • ((゚ー゚) + (o^_^o)) #=> 7
  • ((゚ー゚) + (゚ー゚)) #=> 8
  • ((゚ー゚) + (゚ー゚) + (゚Θ゚)) #=> 9
How to "eval"
(゚Д゚) ['_'] ( (゚Д゚) ['_'] (゚ε゚+ ... ) (゚Θ゚)) ('_');
// the following is same as above:
Function(
    Function(
        "return\"alert(\"Hello, JavaScript\")\""
    )(1)
)("_");
// or
Function("alert(\"Hello, JavaScript\")")("_");

Special Thanks

Output of this survey