installing node via homebrew vs package
For just running javascript you are just using node and npm etc. It does not matter how you installed them.

They would be separate installs of node and which one you get depends on your PATH environment variable.

The tutorial justs gives Homebrew as a different installation probably because the user manages other packages (e.g. git) by Homebrew and it is easier to use one package manager rather than go for a separate different install for each package.