# ChrisB:Vereinfachte Schreibweise für JS

SELF-Forum

## Vereinfachte Schreibweise für JS

Hi,

Hallo, wie wärs denn mit

var dc = function(str){
document.write(str);
};

dc("hallo");


Wozu eine Funktion drumherum basteln?

~~~javascript
var w = document.write;
w("I know I should probably not be using document.write in the first place.");


MfG ChrisB

--
Autocomplete has spoiled me to a point where it happens every so often that I encounter a CAPTCHA, and I just type in the first character … and then wait for the rest of the code to be automatically suggested :/