added brief javascript example