+ 2
Can you solve this problem?
Write a javascript that makes true the following condition: if (a==1 && a==2 && a==3) { ... }
2 Réponses
+ 2
const a = {
num: 0,
valueOf: function() {
return this.num += 1
}
};
const equality = (a==1 && a==2 && a==3);
console.log(equality);
+ 2
const a = {
i: 1,
toString: function () {
return a.i++;
}
}
if(a == 1 && a == 2 && a == 3) {
console.log('Hello World!');
}