I'm new in javascript.
I want to what's the difference between this
function aa(){
//code
}
function bb(){
//code
}
and this
var b = {
aa : function (){
//code
},
bb: function () {
//code
}
};
I know about function. but I don't know about the another one.
What's it called and what's differences?? which one is better and faster??
Thanks in advance.