how to add extension to all files terminal

Shell
//terminal 
for f in * ; do 
  mv "$f" "$f.js"
done
Source

Also in Shell: