// ~~ used to convert some types to int (32 bit int)
// Examples
// ~~NaN = 0
// ~~'-1' = -1
// ~~true = 1
// ~~false = 0
// ~~5.6 = 5
"??" is called Nullish coalescing operator.
return the right hand side of operator if left hand side is null or undefined.
For example.
const foo = null ?? 'default string';
console.log(foo);
// expected output: "default string" because left hand side is null
const baz = 0 ?? 42;
console.log(baz);
// expected output: 0 . because 0 is not null or undefined.
~~'-1' = -1
~~true = 1
~~false = 0
~~5.6 = 5
;(function( $, $$ ){ 'use strict';
// skipped
})(
typeof jQuery !== 'undefined' ? jQuery : null,
typeof cytoscape !== 'undefined' ? cytoscape : null
);
~~ used to convert some types to int (32 bit int)
~N = -(N+1)
// ~~ used to convert some types to int (32 bit int)
// Examples
// ~~NaN = 0
// ~~'-1' = -1
// ~~true = 1
// ~~false = 0
// ~~5.6 = 5