Find all files with the extension ".js" in the current directory and its subdirectories up to a maximum depth of 3, and execute the command "sed -i "s/search/replace/g" {} +" on each of them.
find ~ -maxdepth 3 -name "*.js" -exec sed -i "s/search/replace/g" {} +