For adding code blocks in your blogs, add the language extension after the 3 backticks like this
It will show the code just like code editors show for JS code
Thanks for the insightful comments!
I'll be sure to add language extensions to code blocks in future posts. And you're spot on about using the modulo operator – it's a cleaner solution. I'll update the post accordingly.
Appreciate your input!
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.
Few pointers -
For adding code blocks in your blogs, add the language extension after the 3 backticks like this

It will show the code just like code editors show for JS code
For this code
Could be replaced by this
Does the same work
Thanks for the insightful comments!
I'll be sure to add language extensions to code blocks in future posts. And you're spot on about using the modulo operator – it's a cleaner solution. I'll update the post accordingly.
Appreciate your input!