Glad I can be of any help.
Good variable names is one thing but it's just one step. If I take your example:
function getFlaggedCells() { let flaggedCells = []; for (let cell in gameBoard) { if (cell[STATUS_VALUE] == FLAGGED) flaggedCells.add(cell); } return flaggedCells; }
It's more readable but
function getFlaggedCells(gameBoard) { return gameBoard.filter(cell => cell[STATUS_VALUE] === FLAGGED) }
I find it more readable.
Again, I really learned a lot from you, but here I can only say thank you very much to you and thank you for creating this discussion.
ha no problems. Keep on writing, it opens up discussions. 👌
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Glad I can be of any help.
Good variable names is one thing but it's just one step.
If I take your example:
It's more readable but
I find it more readable.
Again, I really learned a lot from you, but here I can only say thank you very much to you and thank you for creating this discussion.
ha no problems. Keep on writing, it opens up discussions. 👌