Code for interactive JavaScript example with innerHTML