added JavaScript as code example