Cross Code
43 subscribers
233 photos
28 videos
1 file
125 links
Everyone has a channel now why not me ig.
Expect dev and gaming stuff.
In-joy

Discussions here - https://t.me/+CkXl8tSd-Ds0YmVk
Download Telegram
🔄 Swap Variables without a temp variable

Here’s a quick and cool trick to swap two variables without a temp variable using XOR.
a = 5
b = 9

a = a ^ b
b = a ^ b
a = a ^ b

print(f"a = {a}, b = {b}") # a = 9, b = 5

Magic! Now a is 9 and b is 5.
Cross Code
https://youtu.be/lmClPGvdWTI
Funny that their is a study that shows as u get more buff u become dumber. Technically speaking, what the study shows is as u use more juice u become dumber. Life responsibly
Hot take 🔥
Types of people you can offend easily:
1. Tech bros
2. LGQHDTV people
3. Women ☕️🗿
I did youtube had to change the perfect UI they already have
Am today years old knowing a pepper 🌶 is a fruit.
What is going on?
Take note
You learn with your hands, you do not learn with your eyes.

#wisdom 🗿
How I test if my mic is working be like:
Lies the `===` operator tell. JS👽

=== ( “strict equality” ) operator has some nuances. The === operator is designed to lie in two cases of special values: NaN and -0.

Consider:


NaN === NaN;                //false
0 === -0 //true



You could use 0 === -0 intentionally in your program for whatever reason. ( I know you lot are weird )

How to avoid deez pitfalls:

1. Use Number.isNaN(..) for NaN checks.
2. Use Object.is(..) for -0 comparisons (and for NaN too).

Object.is(..) in action:

console.log(Object.is('1', 1));
// Expected output: false

console.log(Object.is(NaN, NaN));
// Expected output: true

console.log(Object.is(-0, 0));
// Expected output: false

const obj = {};
console.log(Object.is(obj, {}));
// Expected output: false

Think of Object.is(..) as the “quadruple-equals” ====, the really-really-strict comparison!😉

#JS
Skywalker Leul
https://youtube.com/shorts/lz1O-rUes-s?si=RFJ6gsm8_JL_jemZ
The man was already retired gymnast in 2004. Damn. Their levels to this shit. 🐐🐐🐐
Forwarded from Troll Football