How to change font in javascript function code example Example: change font js selector.style.fontFamily = "Times New Roman";