The following program prints "Hello world" as expected
var print = function(t){
document.write(t);
};
var printAlias = print;
printAlias("Hello world");
But when I use the same technique with document.write it does not work.
var write = document.write ;
write("Something);
Can anybody tell me what am I missing?