Separated JS code from HTML