bad javascript code