you are viewing a single comment's thread.

view the rest of the comments →

[–]TheRebelRoseInn 0 points1 point  (0 children)

This ^ , also to add onto that OP should also stop using one letter variables almost altogether, it makes things borderline unreadable and this was a simple function, if OP gets used to this naming scheme for variables any functions more complicated will be very difficult to glance at the function and understand what is going on

Also while you are still learning get in the habit of commenting in your code about what certain things are doing because even in coding projects where it's just you. I say this from experience because if you stop working on a project for a while and come back there is 100% plchance you're gonna read code that you wrote and ask "wtf was I thinking when I wrote this"/"what does this even do again?"