I thought that element.getAttribute('onclick') returns a string-version of whatever element.onclick is set to.

```
var as = document.getElementsByTagName('a');
for(var i=0; i < as.length; i++) {
    // set test to some javascript text
    var test = as[i].getAttribute('onclick');

     // set test to "null"
    var test = String(as[i].onclick);
}

```

Why is the ".onclick" notation returning null, when the .getAttribute('onclick') shows a value?