The expression ~~3.8 evaluates to 3. The ~ operator (bitwise NOT) first converts its operand to a 32-bit integer, then inverts all the bits, effectively calculating -(x+1) for a number x. When applied twice (~~x), it's equivalent to Math.floor(x) for positive numbers, but without the decimal part for negative numbers (actually equivalent to Math.trunc(x)). This bitwise trick is sometimes used as a faster alternative to Math.floor() or parseInt() when dealing with positive numbers.