javascript - Push and pass array parameter -



javascript - Push and pass array parameter -

i have little recursion routine, , curious how force array item , pass array item in phone call recurse? this:

function recursefunc(element) { var $ = window.jquery; var walkfunc = function(element, apattern) { if($(element).parents('[pattern]')[0]) { homecoming walkfunc($(element).parents('[pattern]')[0], apattern.push($(element).attr('pattern'))); } homecoming concat(apattern,$(element).attr('pattern')); } homecoming walkfunc(element,[]); }

array.push returns count of array , not array object.

javascript

Comments

Popular posts from this blog

maven fortify plugin : Unable to load build session with ID XXXXX .. See log file for more details -

c# - Primavera WebServices does not return any data -

android - Display emoji panel with genymotion - keyboard/touch input? -