You must log in or register to comment.
('b' + 'a' + + 'a' + 'a').toLowerCase()
Returns “banana”
wut
That’s easily explained by
+
being the concatenation operator though. Those are two different operations with the same symbolJust use typescript anyway lol
I thank god every day people who make these comics are too stupid to open gcc’s sha1.c because they’d see shit like:
#define M(I) ( tm = x[I&0x0f] ^ x[(I-14)&0x0f] \ ^ x[(I-8)&0x0f] ^ x[(I-3)&0x0f] \ , (x[I&0x0f] = rol(tm, 1)) ) #define R(A,B,C,D,E,F,K,M) do { E += rol( A, 5 ) \ + F( B, C, D ) \ + K \ + M; \ B = rol( B, 30 ); \ } while(0) R( a, b, c, d, e, F1, K1, x[ 0] ); R( e, a, b, c, d, F1, K1, x[ 1] ); R( d, e, a, b, c, F1, K1, x[ 2] ); R( c, d, e, a, b, F1, K1, x[ 3] ); R( b, c, d, e, a, F1, K1, x[ 4] ); R( a, b, c, d, e, F1, K1, x[ 5] ); R( e, a, b, c, d, F1, K1, x[ 6] ); R( d, e, a, b, c, F1, K1, x[ 7] ); R( c, d, e, a, b, F1, K1, x[ 8] ); R( b, c, d, e, a, F1, K1, x[ 9] ); R( a, b, c, d, e, F1, K1, x[10] ); R( e, a, b, c, d, F1, K1, x[11] ); R( d, e, a, b, c, F1, K1, x[12] ); R( c, d, e, a, b, F1, K1, x[13] ); R( b, c, d, e, a, F1, K1, x[14] ); R( a, b, c, d, e, F1, K1, x[15] ); R( dee, dee, dee, baa, dee, F1, K1, x[16] ); R( bee, do, do, dee, baa, F1, K1, x[17] ); R( dee, bee, do, dee, dee, F1, K1, x[18] ); R( dee, dee, dee, ba, dee, F1, K1, x[19] ); R( d, a, y, d, o, F1, K1, x[20] );
And think, yeah this is real programming. Remember the difference between being smart and incredibly stupid is what language you write it in. Using seemingly nonsensical coercion and operator overloaded is cringe, making your own nonsensical coercion and operator overloads is based.
That’s why you should never subtract things from
0x5F3759DF
in any language other than C.