What is the best way to declare functions within a Javascript class?

Viewed 960

I'm trying to understand the difference between 2 different function declarations in JavaScript.

Consider the following code snippet:

function SomeFunction(){

   this.func1 = function(){
   }

   function func2(){
   }
}

What is the difference between the declarations of func1 and func2 above?

5 Answers
Related