Corrected JavaScript example in documentation.