Find all files with the extension .js in the current directory and its subdirectories, and replace all occurrences of the word "public" with "private" in each file.
find ./ -name '*.js' -exec sed -i 's/public/private/g' {} +