In javascript we can change properties of constant object. So if I have some factory in AngularJs defined as below
myApp.factory('sampleFactor', function() {
var sampleFactoryVar = {
setFoobar: function(foo){
//perform some operations
return foo;
},
getFoobar:function(){
//perform some operations
}
};
return sampleFactoryVar;
});
In this factory if I will be declaring sampleFactoryVar as const will it make any significant impact on performance ?
Please consider sampleFactoryVar is holding lots of properties.