The property float is an exception, as it is special in JavaScript. For it, you should write cssFloat:
float
cssFloat
elem.style.cssFloat = 'right';
Given a list ul and a button. On button click add property float with value left to li tags.
ul
left
li