Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

Replace eval(displayNum) with +displayNum - eval executes the value which not only slower it's vulnerable to XSS.

Other than that you would start to look into making you code Object Oriented (OO) to combine code into logical groups and to take the functions and variables out of the window scope. Good Posts:

http://stackoverflow.com/questions/907225/object-oriented-javascript-best-practiceshttps://stackoverflow.com/questions/907225/object-oriented-javascript-best-practices

http://stackoverflow.com/questions/1908443/what-are-good-javascript-oop-resourceshttps://stackoverflow.com/questions/1908443/what-are-good-javascript-oop-resources

Replace eval(displayNum) with +displayNum - eval executes the value which not only slower it's vulnerable to XSS.

Other than that you would start to look into making you code Object Oriented (OO) to combine code into logical groups and to take the functions and variables out of the window scope. Good Posts:

http://stackoverflow.com/questions/907225/object-oriented-javascript-best-practices

http://stackoverflow.com/questions/1908443/what-are-good-javascript-oop-resources

Replace eval(displayNum) with +displayNum - eval executes the value which not only slower it's vulnerable to XSS.

Other than that you would start to look into making you code Object Oriented (OO) to combine code into logical groups and to take the functions and variables out of the window scope. Good Posts:

https://stackoverflow.com/questions/907225/object-oriented-javascript-best-practices

https://stackoverflow.com/questions/1908443/what-are-good-javascript-oop-resources

Post Migrated Here from stackoverflow.com (revisions)
Source Link
crolpa
crolpa

Replace eval(displayNum) with +displayNum - eval executes the value which not only slower it's vulnerable to XSS.

Other than that you would start to look into making you code Object Oriented (OO) to combine code into logical groups and to take the functions and variables out of the window scope. Good Posts:

http://stackoverflow.com/questions/907225/object-oriented-javascript-best-practices

http://stackoverflow.com/questions/1908443/what-are-good-javascript-oop-resources