JavaScript example