Oh JavaScript... This is why we don't get along.
121
170
2,353
745,006
Replying to @eloffd
@eloffd This is forcing the square peg into the round hole, and crying it broke eventually.
1
0
34
3,871
Replying to @TheMeowku
@TheMeowku The round hole should throw an error when it gets a square peg. It shouldn't put in on a lathe to try to carve off the edges.

Jan 28, 2024 · 2:51 PM UTC

2
0
25
3,487
RepliesRelevant
Replying to @eloffd
@eloffd You started with a square peg smaller than the round hole. It was a deliberate desire to force a known outcome.
1
0
5
300
Replying to @TheMeowku
@TheMeowku It's an attempt to illustrate the problem with the function. Are you trying to say the behavior of the function is fine?
1
0
3
298
Replying to @eloffd
@eloffd I could go on about type conversion, and the basic understanding of the language, but I should ask why you're calling a function that takes a string, with a number in the first place? That's on you, not the language.
0
0
1
48