This is actually an inefficient and time-consuming way of declaring variables. The quicker way to do it involves using the ‘var’ keyword just once, followed by the variables that need to be declared, separated by commas. The code would look something like this –
var Michael, Rick, Bob
This method is not only useful for declaring the variables, but can also be used to initialize the declared variables, like this –
var Michael=“15yr”, Rick=“28yr”, Bob=“56yr”
So, the next time you prep yourself to write code, try some (or maybe all) of these shortcuts and watch your work get infinitely smoother. You can check for SQL tips needed for your coding.
About the Author
ByteScout Team of Writers
ByteScout has a team of professional writers specialized in different technical topics. We select the best writers to cover interesting and trending topics for our readers. We love developers and we hope our articles help you learn about programming and programmers.