Sample JavaScript codes