How do you practice Javascript?

Well right now i’m having issues understanding the purpose of so many functions styles.

In C++ if i want a function i simply do this:

void funcName(paramOne, paramTwo){/*code here*/}

That function can be called in a cpp file and using prototyping to call it whenever necessary as long as it is within a scope.

However there is so many ways of doing a function in javascript!
Here i’ll link that way i dont rewrite the whole thing!