javascript example for dennis