KOKozo Oeda@kozmof·Oct 2351e28afInterestingjsconst index = 5; const result = index & -index; console.log(result); // 11Quote
FAFiras Amara@BarnoTD·Oct 23305ec7f& is a bitwise AND operator, result basically treats index and -index as signed binary numbers and performs Bitwise AND on them which is equal to 000(...)001Quote
KOKozo Oeda@kozmof·Oct 235d177c0Exactly. It can get a last bit value.11:12 · Oct 23, 2026 · commit 5d177c0QuoteReply