Find all files with the extension .js, and for each of them, execute a command to replace the string $1 with a random 3-byte hexadecimal string.
find . -type f -name "*.js" -exec sed "s/$1/$(openssl rand -hex 3)/g" {} \;