Added string function to .js file.