[-] Konlanx@feddit.de 75 points 1 year ago* (last edited 1 year ago)
[-] Konlanx@feddit.de 63 points 1 year ago* (last edited 1 year ago)

I'm a straight cis guy and I like the memes posted in this community. They are 99% wholesome and just asking for acceptance in meme format, which is nice.

Seems like feddit.de shows a lot of Blahaj stuff and that's good.

[-] Konlanx@feddit.de 61 points 1 year ago

Uff... Wenn die AfD in der Regierung mitmacht, dann müssen wir ja Widerstand machen.

Diggah, gar kein Bock, aber muss dann ja.

[-] Konlanx@feddit.de 56 points 1 year ago

This is due to the default sorter in JavaScript sorting by the string value. The reason for that is that this won't create errors at runtime. Since JavaScript does not have types, this is the safest way of sorting.

This works:

const unsorted = [1, 100000, 21, 30, 4]
const sorted = unsorted.sort((a, b) => a - b) 
[-] Konlanx@feddit.de 66 points 1 year ago

What a great post. Thank you for sharing it and all the best for you!

[-] Konlanx@feddit.de 58 points 1 year ago* (last edited 1 year ago)

It's not. The default sorter does that, because that way it can sort pretty much anything without breaking at runtime. You can overwrite it easily, though. For the example above you could simply do it like this:

[3, 1, 10].sort((a, b) => a - b)

Returns: [1, 3, 10]

[-] Konlanx@feddit.de 77 points 1 year ago* (last edited 1 year ago)

JS !== Java

Try Javascript some day!

  • We have truthy and falsy! Empty string or null? Yeah, that's false!
  • Of course we can parse a string to number, but if it's not a number it's NaN!
  • null >= 0 is true!
  • Assign a variable with =, test type equality with == and test actual equality with ===. You will NEVER use the wrong amount of = anywhere, trust me!
  • Our default sort converts everything to string, then sorts by UTF-16 code. So yes, [1, 10, 3] is sorted and you are going to live with it.
  • True + true = 2. You know I'm right.

Try Javascript today!

[-] Konlanx@feddit.de 162 points 1 year ago

Both of them are used to transport mostly a single person at a time. Even the small one is too big.

[-] Konlanx@feddit.de 77 points 1 year ago

So, my grandfather has a smartphone and knows enough about it to call, send messages and most importantly, use the emergency contacts. My grandmother doesn't really understand the phone. One time I called them to say congratulations for her birthday and she didn't know how to hang up, so apparently she just put the phone down. I could hear them talk, saying that "he's become a good person, always remembers us" and the fact that I wasn't meant to hear that made it extremely meaningful to me.

[-] Konlanx@feddit.de 57 points 1 year ago

NASA has a super interesting explanation about it here: https://svs.gsfc.nasa.gov/4709

Probes have also been taking pictures: https://en.m.wikipedia.org/wiki/Far_side_of_the_Moon

I know you are joking, but it's super interesting to me, so I wanted to share something about it.

[-] Konlanx@feddit.de 61 points 1 year ago

It's super simple!

You click a square, it's either a bomb or not. If it's not, it will show a number telling you how many of the surrounding 8 squares contain a bomb. If a square has 0 bombs in surrounding squares it will just open, so you save unnecessary clicks. It's the goal to click every square that does not contain a bomb. If you click a bomb, you lose.

After understanding the rules you can beat the game super quick and easily.

[-] Konlanx@feddit.de 77 points 1 year ago

Und die sind sich sicher, dass es gar keinen anderen Ort gibt, an dem man bauen könnte? Ganz, ganz sicher?

view more: next ›

Konlanx

joined 1 year ago