I have seen the following javascript in a webpage.
s = String["fromC" + aa.nodeValue];
May I know what is the usage of String[...]?
The square-bracket notation is just another way to access object properties or methods, usually by some kind of variable as opposed to the dot notation which accesses properties by symbol or key.
Say aa.nodeValue was equal to the string "harCode". This would work like this
var s = String["fromCharCode"];
Which is equivalent to
var s = String.fromCharCode;
So s is now a pointer to the static fromCharCode method on String.
Similarly, if aa.nodeValue was equal to "odePoint", you would be referencing String.fromCodePoint
Its just String.fromCharCode(), written in an obfuscated way, it can be like:
aa = document.createTextNode("harCode");
s = String["fromC" + aa.nodeValue];
which would finally become String["fromCharCode"] which is equivalent to String.fromCharCode