Another JavaScript WAT

 • 

If you haven't seen the lightning talk "WAT", go do so.

Courtesy of Rich Harris:


input = document.createElement('input');

input.getAttribute('value'); // null
input.value = 'one';
input.getAttribute('value'); // null

input.setAttribute('value', 'two');
input.value; // 'one'

Go try it in a browser. I want to laugh and cry at the same time.