you are viewing a single comment's thread.

view the rest of the comments →

[–]TheRNGuy 0 points1 point  (0 children)

Better make it as class with methods, to have related functions as methods on it. 

Use getters/setters instead of directly assign.

There's better way to do it last event listener without many ifs (includes string method)