javascript: examples fixed