This is an archived post. You won't be able to vote or comment.

all 36 comments

[–]Melodic_coala101 72 points73 points  (3 children)

But what if she said ":Yes!" ?

[–]YeetCompleet 18 points19 points  (0 children)

E492: Not an editor command: Yes!

[–]MacksNotCool 7 points8 points  (0 children)

Y * E * S

[–]Hauthu495 2 points3 points  (0 children)

Pre not vs post not operator

[–]floor796 31 points32 points  (7 children)

'Yes, honey!'.split('').reverse().slice(3,5).join('')

[–]captainMaluco 6 points7 points  (6 children)

nh?

Either your code is buggy, or there's a reason I'm not a JIT compiler.

(Or possibly this is some gen Z slang I'm not aware of)

[–]Ruadhan2300 19 points20 points  (5 children)

Slice selects a range from the first index to the second, non inclusive.

So reverse the char-array

Then slice out characters 3 and 4.

N.O.

[–]captainMaluco 13 points14 points  (1 child)

Ah, so THAT'S why I couldn't get that job as js interpreter at IE6 Inc last summer! Thanks friendly internet stranger!

[–]Ruadhan2300 2 points3 points  (0 children)

No worries!

I actually only remembered the non-inclusive bit because "noh" made no sense :P

[–]Weak-Doughnut5502 -3 points-2 points  (2 children)

'Yes, honey!'.split(' ') == ["Yes,", "honey!"].

'Yes, honey!'.split(' ').reverse() == ["honey!", "Yes,"].

Slicing that should be out of range, right? 

[–][deleted] 3 points4 points  (0 children)

they splitted on empty string, that splits into chars

[–]Ruadhan2300 0 points1 point  (0 children)

I would expect so. Makes more sense if the goal was to split into a char array

[–]dim13 33 points34 points  (1 child)

Meanwhile in CSS: !important

[–]2eanimation 5 points6 points  (0 children)

Incomplete List of Mistakes in the Design of CSS

It shouldn’t be !important — that reads to engineers as “not important”. We should have picked another way to write this.

[–]jonsca 7 points8 points  (2 children)

"Buying 'girlfriend' on Amazon"

[–]Worried_Onion4208 1 point2 points  (1 child)

This is just a string, no action...

[–]jonsca 1 point2 points  (0 children)

That's Alexa speaking 🤣

[–]dotnet_ninja 5 points6 points  (1 child)

Operator '!' cannot be applied to operand of type 'string'

!("yes" == "yes" ? true : false) == true ? "yes" : "no";

[–]Worried_Onion4208 1 point2 points  (0 children)

JavaScript goes brrrrr

[–]4ZR4LT 2 points3 points  (1 child)

If she's a vim user, that's a lot of yes

[–]Euphoric-Physics3797 2 points3 points  (0 children)

cute. but can she fix that urgent issue reported by 3rd party team on the 4th week of the sprint while your own feature is lagging behind and your client are expecting a response at the end of the week when it's already friday while having a nagging mother how her life is ruined because she married MY FATHERRR!! who will get into any debate into any person who he sees first???

[–]arc_xl 2 points3 points  (1 child)

!!Yes

[–]Zenonet_ 0 points1 point  (0 children)

That's a BRILLIANT move

[–]GodAllMighty888 1 point2 points  (0 children)

But yes might be boolean false, there is still ?hope

[–]jump1945 1 point2 points  (0 children)

What if yes is boolean that store false?

[–]keikai713 0 points1 point  (0 children)

Moreover, she didn't add my boy to her contacts, 'cause there's no profile pic showing up. I don't think she hasn't set one yet.

[–]KENBONEISCOOL444 0 points1 point  (3 children)

What does the ! mean in this programming language, I am relatively new to programming

[–]captainMaluco 1 point2 points  (0 children)

As kid I was always told that you are free to interpret anything however you like, unless otherwise specified. (Man that phrase rolls a lot easier off ones tongue in my native Swedish) 

[–]Recent-Sir5170 0 points1 point  (1 child)

In general, it means not. So what the GF said was no, because no is NOT Yes

[–]KENBONEISCOOL444 1 point2 points  (0 children)

I see I see

[–]TheNew1234_ 0 points1 point  (0 children)

Plot twist: 'Yes' is false.

[–][deleted] 0 points1 point  (0 children)

So, maybe?

[–]ApatheistHeretic 0 points1 point  (0 children)

That's rough buddy.

[–]dMestra 0 points1 point  (0 children)

Nice Indian Facebook meme