basic javascript code