the "it" variable
Have you ever coded something that looks like:
if(isOpen) {
} else if (isOpening){
} else if(isClosed) {
}
...
Read that code out loud. Seriously, do some Rubber duckie debugging. You almost definitely said this:
if(itIsOpen) {
} else if (itIsOpening) {
} else if(itIsClosing) {
}...
name your boolean variables with "it", and your code is now readable!
Written by Prashanth Sadasivan
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Programming
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#