For js, I have following function:
function custom(){
var rhcmm_append = function (data) {
var id = data.ids;
var name = data.names;
// and more variables and conditions etc
};
...
}
I have few occasions in which I use the same variables and functions inside of function(data).
Is there a way to make these variables into a function that I can re-use?
For example:
function VAR_FUNCTION(data){
var rin_ids = data.thread_id.split(',');
var rin_user = data.user_name;
}
Thanks.
VAR_FUNCTION