Apr-02-2020, 05:45 PM
Why are you declaring the class inside your function? It's unnecessary (for a start, that means that class will be redefined every time that function is called) and perhaps more importantly here, interrupts the readability of your function - seeing all the details takes your focus away from what the function is actually for.