What is the purpose of running “npm init -y”?

“npm init -y” is a command used to quickly set up a new npm project. It creates a package.json file in the current directory with default values such as project name, version number, author, etc. By using the “-y” flag, all default values are accepted without the need for manual input. This allows for a quick start to a new project without manually configuring the package.json file.

bannerAds