|
- How do you use the ? : (conditional) operator in JavaScript?
What is the ?: (question mark and colon operator aka conditional or quot;ternary quot;) operator and how can I use it?
- What does tilde (~) operator do? - Stack Overflow
The ~ operator in C++ (and other C-like languages like C and Java) performs a bitwise NOT operation - all the 1 bits in the operand are set to 0 and all the 0 bits in the operand are set to 1 In other words, it creates the complement of the original number For example: 10101000 11101001 Original (Binary for -22,295 in 16-bit two's complement) 01010111 00010110 ~Original (Binary for
- What does the `%` (percent) operator mean? - Stack Overflow
1 That is the modulo operator, which finds the remainder of division of one number by another So in this case a will be the remainder of b divided by c
- c - What is the difference between ++i and i++? - Stack Overflow
In C, what is the difference between using ++i and i++, and which should be used in the incrementation block of a for loop?
- What does the !! (double exclamation mark) operator do in JavaScript . . .
The !! operator reassures the lint tool that what you wrote is what you meant: do this operation, then take the truth value of the result A third use is to produce logical XOR and logical XNOR
- What does the - gt; operator mean in C++? - Stack Overflow
The -> operator is used with a pointer (or pointer-like object) on the LHS and a structure or class member on the RHS (lhs->rhs) It is generally equivalent to (*lhs) rhs, which is the other way of accessing a member
- scope resolution operator - What does the - Stack Overflow
56 :: is the scope resolution operator - used to qualify names In this case it is used to separate the class AirlineTicket from the constructor AirlineTicket(), forming the qualified name AirlineTicket::AirlineTicket() You use this whenever you need to be explicit with regards to what you're referring to Some samples: namespace foo { class bar; }
- When should I use ?? (nullish coalescing) vs || (logical OR)?
The ?? operator was added to TypeScript 3 7 back in November 2019 And more recently, the ?? operator was included in ES2020, which is supported by Node 14 (released in April 2020) When the nullish coalescing operator ?? is supported, I typically use it instead of the OR operator || (unless there's a good reason not to)
|
|
|