Just a exercise of JavaScript.