Цитата:
мдаааа ёршкин кот .... опечатка ха с икс перепутал |
вопрос чему равен x ? :)
console.log((typeof x != 'string') && (x > 'x')); // true console.log((typeof x != 'string') && (x > 'x')); // true console.log((typeof x != 'string') && (x > 'x')); // true console.log((typeof x != 'string') && (x > 'x')); // true console.log((typeof x != 'string') && (x > 'x')); // true console.log( x == x && x > x) // true console.log( x == x && x > x) // true console.log( x == x && x > x) // true console.log((typeof x != 'string') && (x > 'x')); // true console.log( x == x && x > x) // true console.log((typeof x != 'string') && (x > 'x')); // true console.log( x == x && x > x) // true console.log((typeof x != 'string') && (x > 'x')); // true console.log( x == x && x > x) // true console.log((typeof x != 'string') && (x > 'x')); // true console.log( x == x && x > x) // true console.log((typeof x != 'string') && (x > 'x')); // true console.log( x == x && x > x) // true console.log((typeof x != 'string') && (x > 'x')); // true console.log( x == x && x > x) // true console.log(typeof x)//object |
Цитата:
поцказка: x+x='wat' |
const x = {valueOf: () => 'y'} |
var x = ((i = 0)=>({ toString: ()=> --i }))(); console.log('1: ' + x + ' ,2: ' + x + ' ,3: ' + x + ' ,4: ' + x); //1: -1 ,2: -2 ,3: -3 ,4: -4 console.log((x == x) && (x > x)); //true (-1 != -2) седовательно x == x //false Где логика ? В чем подвох ? __ Понял. объекты сравниваются. |
Часовой пояс GMT +3, время: 05:37. |