hi everyone
i'm somewhat new to javascript. i'm familiar with object-oriented languages and how their codebases are usually organized (it's pretty easy since each object is basically a container for most related functions) but i'm not so sure how to do things like that in pure scripting languages like javascript, which dont have traditional objects. i'm also just generally unsure of how to make my code more readable, less messy, more condensed, etc. and i'd really appreciate some tips for how to accomplish this. in the code below, i tried my best to do the recommended javascript code practices, like caching DOM elements, marking variables that dont change as const, using a forEach iterator, using `x is ${x}` instead of string concatenation, etc. but it's still quite the mess :(
any tips at all are much appreciated. i don't want to look back at this code in a month and be completely lost
code:
https://pastebin.com/Y4MeegR7P.S. it's for a scrabble game. there's some html elements like "#position_validator" and "#potential_points" and "#first_move_message" which are there just to make some variables more visible while i'm working on this. dont worry about those