Some people state that changing the CSS via the style object is a bad practice.
For example doing something like this:
document.getElementById('message').style.fontWeight = 'bold';
Instead one should add / remove classes for influencing the layout.
Unfortunately nobody becomes precise why it is bad to use the style-object.
Therefore my question here:
Can someone explain why one shall avoid this technique?