This question already has answers here:
Optional Chaining in JavaScript [duplicate]
(8 answers)
How does the JavaScript optional chaining(?.) operator works?
(2 answers)
Closed 10 months ago.
What does this mean
doc.data()?.email === auth.currentUser.email
?. <- what does this imply I saw it in a firebase project
Related
This question already has answers here:
Question mark before dot in javascript / react [duplicate]
(1 answer)
Optional Chaining in JavaScript [duplicate]
(8 answers)
What does this symbol mean in JavaScript?
(1 answer)
Closed 2 years ago.
I have no idea what ?. means. Example:
React.useEffect(() => {
if (route.params?.post) {
// Post updated, do something with `route.params.post`
// For example, send the post to the server
}
}, [route.params?.post]);
It's hard to google the answer. I just see articles on the conditional (ternary) operator.
This question already has answers here:
What does this symbol mean in JavaScript?
(1 answer)
What's the significant use of unary plus and minus operators?
(2 answers)
Closed 2 years ago.
I have problem with understanding this code. I know what it do, but I dont understand the "+" after return.
function descendingOrder(n) {
return +n.toString().split('').sort().reverse().join('');
}
This question already has answers here:
What do ">>" and "<<" mean in Javascript?
(10 answers)
What does the ^ (caret) symbol do in JavaScript?
(5 answers)
What do these JavaScript bitwise operators do?
(3 answers)
What does this symbol mean in JavaScript?
(1 answer)
Closed 8 months ago.
I was going through a small program and i came across this syntax in javascript.
hash = Math.abs((hash << 2) ^ (hash + y))
please what does it mean?
hash was initially 0; i.e hash = 0;
This question already has answers here:
Why can't I access a property of an integer with a single dot?
(5 answers)
Why does 10..toString() work, but 10.toString() does not? [duplicate]
(3 answers)
Why don't number literals have access to Number methods? [duplicate]
(3 answers)
Closed 3 years ago.
The following syntax generates an error:
5.toString();
But the following doesn't:
(5).toString();
What does the parentheses exactly do here?
This question already has answers here:
Which equals operator (== vs ===) should be used in JavaScript comparisons?
(48 answers)
JavaScript Equality Operator
(3 answers)
Closed 9 years ago.
Splitting hair here, but my editor complains I should use a !== null instead of a != null in a Javascript if statement. What is the difference?
Update
This question has been closed as duplicate, but the other questions supposedly answering my question are not answering it... Check their answers! There is a subtlety here -> null