[Pas2js] The operator ??
warleyalex
warleyalex at yahoo.com.br
Sat Dec 22 14:37:57 CET 2018
So for example let’s consider the nullable float value x in the following
example;
If it is specified it will print its value, otherwise it will print "‘1".
---// the special operator ?? //----------------------
var
x: JSValue;
begin
console.log(x ?? 1);
end;
------------------------------
//------- JS output : The operator ?? translates to something like:
//--------
var x;
console.log(x||1);
--------------------------------
--
Sent from: http://pas2js.38893.n8.nabble.com/
More information about the Pas2js
mailing list