JavaScript also contains a conditional operator that assigns a value to a variable based on some condition.