-3

var name = ""; console.log( name ? "The name is " + name : "The name has not been informed" );

sar Q
  • 1
  • See [What does this symbol mean in JavaScript?](/q/9549780/4642212) and the documentation on MDN about [expressions and operators](//developer.mozilla.org/en/docs/Web/JavaScript/Reference/Operators). – Sebastian Simon Oct 16 '22 at 15:43

1 Answers1

0

The conditional (ternary) operator https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Conditional_Operator

Illia
  • 51
  • 6