JavaScript Sample Code