Why is Javascript so damn convoluted?