what purpose of such pattern?
var ns=function(){
//do some stuff
}
ns.test=function(){
//do another stuff
}
I saw code that is similar to that, but I don't understand advantages of such pattern.
Also seems like this is similiar to properties of objects.
also this pattern some times used with closures, and it seems that jquery uses it, but not sure about that.
Thanks!