Git Product home page Git Product logo

Comments (8)

panzerdp avatar panzerdp commented on May 29, 2024

Comment written by collegeimprovements me on 08/17/2016 10:27:30

This is cool. Thanks a lot for this article. I hope you keep writing such articles. :)

from dmitripavlutin.com-comments.

panzerdp avatar panzerdp commented on May 29, 2024

Comment written by Dmitri Pavlutin on 08/17/2016 10:49:34

Glad you like it! I do plan in the long run to create even more interesting articles :).

from dmitripavlutin.com-comments.

panzerdp avatar panzerdp commented on May 29, 2024

Comment written by Xavier Haniquaut on 08/18/2016 12:41:53

Hey Dmitri !
Here is one close to the Array.includes() one ;)

Sometime when we wanted to search an element inside an array we used the following pattern :
const needle = haystack.filter(hay => hay === 'needle')[0];
Now we can use the way more semantic :
const needle = haystack.find(hay => hay === 'needle')

What do you think?

from dmitripavlutin.com-comments.

panzerdp avatar panzerdp commented on May 29, 2024

Comment written by Dmitri Pavlutin on 08/18/2016 14:04:47

Hey Xavier,
Nice catch! The hack haystack.filter(matchFun)[0] is solved using haystack.find(matchFun) nicely.
Methods like .find() in array should have been created in the first JavaScript versions, but not after 20 years :). Better late than never anyway.
Thanks!

from dmitripavlutin.com-comments.

panzerdp avatar panzerdp commented on May 29, 2024

Comment written by adardesign on 02/13/2017 02:19:37

Thanks for the well written articles

from dmitripavlutin.com-comments.

panzerdp avatar panzerdp commented on May 29, 2024

Comment written by Dmitri Pavlutin on 02/13/2017 11:37:00

You're welcome!

from dmitripavlutin.com-comments.

atengberg avatar atengberg commented on May 29, 2024

Think I've reread many of your articles at least twice in the last two years while learning Javascript, React, etc. Thanks for sharing your knowledge, has made the path to becoming a modern day developer easier!

from dmitripavlutin.com-comments.

panzerdp avatar panzerdp commented on May 29, 2024

Thanks @atengberg!

from dmitripavlutin.com-comments.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.