exercise demo with javascript