Tuesday, 10 September 2013

How does Javascript return work?

How does Javascript return work?

pThis is what I have/p precode$wrapper.find('li').sort(function (a, b) {
return +a.getAttribute('data-val') - +b.getAttribute('data-val'); });
/code/pre pIt works, as I see in Chrome dev tool an array of objects is
indeed returned but...my question is: What's up with that return? How can
I use that array? /p pWhat I want to do i to take the returned array, and
stick it inside a tag./p

No comments:

Post a Comment