[-] Konlanx@feddit.de 76 points 1 year ago* (last edited 1 year ago)
[-] Konlanx@feddit.de 64 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 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 54 points 1 year ago* (last edited 1 year ago)

A racing game that has a very nice track builder and is very open to modding. Its focus is on the individual driver and the time they achieve on a track.

Flying for hundreds of meters, drifting under water, going at high speeds through multiple loopings, sliding on ice and so much more is totally possible with Trackmania.

Try it, the base game is free and their pricing for online services and cups is totally fine.

[-] 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 163 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 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 46 points 1 year ago

You mean the people running big corporations and not giving a fuck about the environment, right?

[-] Konlanx@feddit.de 62 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 78 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