When you see this in the internet and get ideas for your next meeting

  • 2
    @rui725 why does it return an array?
  • 20
    Swap those var for let & const already. :p
  • 3
    Ooppss i was looking at reverse the whole time I thought it was the endpoint should be a string haha Ty for pointing that out
  • 14
    @lotd Haha yeah, that would be very much the programmer's action: go in there and instead of claiming your free coffee, tell them that their code is out of date :D
  • 1
    Why is there a . before secret?
  • 1
    @avalanche I thought it's just dirt or leftover chalk from something that was written there before. There should be a space and nothing else
  • 5
    const yourDrink = 'coffee';
    const reverse = s => s.split('').reverse().join('');
    const barista = {
    str1: 'ers',
    str2: reverse('arap'),
    str3: 'met',
    request: pref => `${pref} secret word: ${barista.str2+barista.str3+barista.str1)`,

  • 3
  • 2
    You know what's funny? The code contains reverse and I believe the pic is flipped on Y axis, too, as I swear to god I've seen it quite some times before and it was a mirror image of this pic.
  • 3
    coffee.secret word: parameters

    ☕ He didn't console.log though
  • 1
    @21stCenturyJoku would go for let yourDrink :p
  • 3
    @lotd Depends, if the offer is only valid for coffee anyway, you might as well make it immutable :D
    But yeah, let probably isn't a bad idea there
  • 2
    @Galrog neither does he have a method to actually give you your drink. :p
    You can just request it, barista is like "ok." and that's all that ever happens. Great coffee shop.
  • 4
    @lotd you don’t argue ES6 with someone who wants to give you free coffee.
  • 4
    @jamescodesthing I'm mostly drinking tea anyways.
  • 5
    @lotd wire in then son! ES6 all the way!
  • 2
    this again.... i think its the 2nd or 3rd time i saw this on devRant
  • 1
    This sign addresses all literate English speakers...
  • 1
Add Comment