submit some JavaScript code I learnt