Javascript: Example update