Can we use JavaScript to change an element's style if it was set with a stylesheet?

Yes, it works no matter where the style was setNo, we can only change inline styles

Yes, it works no matter where the style was set.