You need to enable JavaScript to run this app.
Code for Example 1:
Code for Example 2: