Top "Conditional-operator" questions

The conditional operator is a ternary operator that is part of the syntax for a basic conditional expression in several programming languages.

Multiple Ternary Operators

I need a bit of syntax help with a ternary operator which will help me to put the correct marker …

javascript conditional-operator
The ternary (conditional) operator in C

What is the need for the conditional operator? Functionally it is redundant, since it implements an if-else construct. If the …

c operators ternary-operator conditional-operator
Operator precedence with Javascript Ternary operator

I cant seem to wrap my head around the first part of this code ( += ) in combination with the ternary operator. …

javascript variable-assignment conditional-operator operator-precedence compound-assignment
What is the difference between logical and conditional AND, OR in C#?

Possible Duplicate: What is the diffference between the | and || or operators? Logical AND and OR: (x & y) (x | y) …

c# conditional-operator logical-operators
Nullable types and the ternary operator: why is `? 10 : null` forbidden?

I just came across a weird error: private bool GetBoolValue() { //Do some logic and return true or false } Then, in …

c# .net nullable conditional-operator
Ternary operator in JSTL/EL

The following tag of JSTL can be used to set a value to a variable in a request scope. <…

jsp jstl el ternary-operator conditional-operator
Unique ways to use the null coalescing operator

I know the standard way of using the null coalescing operator in C# is to set default values. string nobody = …

c# coding-style null conditional-operator null-coalescing-operator
JavaScript shorthand ternary operator

I know that in PHP 5.3 instead of using this redundant ternary operator syntax: startingNum = startingNum ? startingNum : 1 ...we can use a …

javascript conditional-operator
Nullable type issue with ?: Conditional Operator

Could someone explain why this works in C#.NET 2.0: Nullable<DateTime> foo; if (true) foo = null; else foo = …

c# generics nullable conditional-operator
C# conditional AND (&&) OR (||) precedence

We get into unnecessary coding arguments at my work all-the-time. Today I asked if conditional AND (&&) or OR (||) …

c# conditional conditional-operator operator-precedence associativity