I need to change 5 classes that have the same name with another name using JS

```js
var left = document.getElementById("right").className = "left";
```

```css
.right {
  float: right;
}

.left {
  float: left;
}
```

```html
<button onclick="changeLeft()">Sinistra</button>
<div class="newsright">
  <img src="images/angular.png" alt="HTML" id="right" class="right">
  <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
</div>
```

How can I do this?