some javascript learning code