===
(одинаково)&&
||
var root =
( typeof self == 'object' && self.self === self && self ) ||
( typeof global == 'object' && global.global === global && global ) ||
( this );
var root =
( (typeof self == 'object') && (self.self === self) && (self) ) ||
( (typeof global == 'object') && (global.global === global) && (global) ) ||
( this );
a = x && '1' || '2'
a = x ? '1' : '2'
const root = (() => {
if (typeof self == 'object' && self.self === self) {
return self
}
if (typeof global == 'object' && global.global === global ) {
return global
}
return this;
}
})();
function* permutatins(s) {
if (s.length > 1)
for (let i = 0; i < s.length; i++)
for (let t of permutatins(s.slice(0, i) + s.slice(i + 1)))
yield s.charAt(i) + t;
else yield s;
}
for (let s of permutatins('941'))
console.log(s);