Basic Javascript, front-end testcode