How to hide / show your mac hidden folder

How to show the hidden folder
1.Open the terminal (found in /Applications/Utilities/)
2.Type the following to show hidden files: defaults write com.apple.Finder AppleShowAllFiles YES
3.Hit enter
4.Type the following (to restart the Finder) : killall Finder
5.Hit enter

How to hide the hidden folder
1.Open the terminal (found in /Applications/Utilities/)
2.Type the following to show hidden files: defaults write com.apple.Finder AppleShowAllFiles NO
3.Hit enter
4.Type the following (to restart the Finder) : killall Finder
5.Hit enter