Salesforce JavaScript-Developer-I Question Answer
Value of:
true + 3 + ' 100 ' + null
" 4100null "
104
" 4100 "
" 2200null "
The correct answer is A .
JavaScript evaluates the expression from left to right:
Step 1:
true + 3
In numeric addition, true is converted to:
1
So:
becomes:
1 + 3
Result:
4
Step 2:
4 + ' 100 '
Because one operand is a string, JavaScript performs string concatenation instead of numeric addition.
Step 3:
" 4100 " + null
Again, because one operand is already a string, JavaScript converts null into the string:
" null "
So the final result is:
Execution summary:
// 1 + 3 + ' 100 ' + null
// 4 + ' 100 ' + null
// " 4100 " + null
// " 4100null "
Therefore, the verified answer is A .
TESTED 03 Jun 2026
Copyright © 2014-2026 ACE4Sure. All Rights Reserved