Added one more example function to JavaScript example