MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/javascript/comments/48eynl/udemy_offering_javascript_course_with_java_logo/d0jjrjs
r/javascript • u/juicyjurgenz • Mar 01 '16
121 comments sorted by
View all comments
Show parent comments
2
page is defined inside the onclick handler string, right before updatePage is called.
page
1 u/altrae Mar 02 '16 It just resets page to 0 there. page had to be not equal to 0 to even get to that reset so it needs to be defined before the if statement, and I'm not seeing that in the snippet. 1 u/sakabako Mar 03 '16 You just ruined what had been my favorite code for two days. 0 u/azium Mar 01 '16 ah your right! Wasn't expecting it there heh.
1
It just resets page to 0 there. page had to be not equal to 0 to even get to that reset so it needs to be defined before the if statement, and I'm not seeing that in the snippet.
1 u/sakabako Mar 03 '16 You just ruined what had been my favorite code for two days.
You just ruined what had been my favorite code for two days.
0
ah your right! Wasn't expecting it there heh.
2
u/sakabako Mar 01 '16
pageis defined inside the onclick handler string, right before updatePage is called.