I have a key value pair containing five keys with values as huge array of thousand objects each . I can either subset it while passing it into a function or i can pass whole array in the function.
For e.g:
keyVal ={"first_array": Object[1000],
"second_array": Object[1000],
"third_array": Object[1000],
"fourth_array": Object[1000]
}
var first_arr = keyVal.first_array
Two possibilities:
function notSubsettedArgs(keyVal){
$.each(keyVal.first_array,function(i,item){
//some processing});
}
function subsettedArgs(first_array){
$.each(first_array,function(i,item){
//do some processing});
}
Does it make difference in javascript ?
Does function takes the load of size of arguments ?
Thanks