Do JavaScript compilers have a preference for how indents, spaces, and curly braces are placed in the source code?

I am currently browsing my collegiate colleagues and asked this question on this issue. Is there a preferred syntax for coding, say, if the offer operator is for JavaScript compilers (JavaScript Engines)? I personally prefer template A when I look at the code myself, but do compilers have a preference too? In other words, are less than 3 patterns taking the same number of steps for compilers to interpret them?

//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

+3
source share
3 answers

. (, ) , - , .

, , , , , . :

, .

+4

( ), .

, -, gzipping JavaScript, , , JavaScript . , , , , , , .

0

. .

, , , , .

0

Source: https://habr.com/ru/post/1759783/


All Articles