JavaScript Array Swap
LET'S PUT YOU OUTSIDE, LIL' GUY. ALL LIFE IS PRECIOUS. let fruits = ['apple', 'oranges'] fruits['push'](fruits['shift']()) console.log(fruits) > ['oranges', 'apple']
A JavaScript logo is treated like a little person being placed outside, while a cheerful cartoon character says “ALL LIFE IS PRECIOUS.” The code swaps the positions of “apple” and “oranges,” creating a humorous contrast between the absurdly compassionate reaction and a simple array operation.
- @gentoomemes / 1122 2022-10-17
- Type
- image
- Size
- 795×800 · 91.4 KiB
- Mood
- absurd, humorous
- Language
- en
- Added