Test javascript code