Hi all.
I'm currently having my peer code review with my colleague and have had this question on the subject. Is there any preferable syntax for coding, say, if clause statement for JavaScript compilers(JavaScript Engines)? I personally prefer the pattern A when I review the code myself, but do the compilers have their preference too? In other words, are below 3 patterns take the same number of steps for the compilers to complete their interpretation?
//Pattern A: with spaces, indentation, and curly braces.
if( a === b ) {
return true;
}
//Pattern B: trimmed spaces and removed indentation
if(a===b){return true;}
//Pattern C: removed curly braces, spaces and indentation
if(a===b)return true;
Thank you