javascript - passing a function within itself -


I have a javascript function called "update data" which I use in another function "process" as a parameter I am passing the function "updateData" itself.

  var updateData = function () {var bean = {"name": $ ("# name"). Val (), "sort": $ ('#sort'). Val (), "Reference": "Sample"}; Var Param = {'Bean': Been, 'Reference': "Sample", 'Ajtext': 'POST', 'url': 'samp.json', 'valFn': Valid data, 'updateFn': UpdateData, 'Populaphane ': PopulateData}; Process (ultimate); };  

I am doing this because I need to force "updateData" to create a button in the process ()

Does this cause any problem Will happen? Is it true?

(I have not encountered any problems so far, but I'm new to functional programming, and I want to make sure that there is no problem doing so.)

This will work because the reason for doing this is that this function is only set to write this function And it has not been evaluated. Therefore, when you call this function, in the updateData variable, the reference object is already referenced and that reference will be passed to the object that you have defined within .


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -