JavaScript sample codes