Comments (8)
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.
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.
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.
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.
Comment written by adardesign on 02/13/2017 02:19:37
Thanks for the well written articles
from dmitripavlutin.com-comments.
Comment written by Dmitri Pavlutin on 02/13/2017 11:37:00
You're welcome!
from dmitripavlutin.com-comments.
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.
Thanks @atengberg!
from dmitripavlutin.com-comments.
Related Issues (20)
- react-usememo-hook/ HOT 12
- javascript-json-modules/ HOT 7
- javascript-import-meta/ HOT 3
- javascript-array-group/ HOT 16
- javascript-array-flatmap/ HOT 23
- interface-vs-implementation/ HOT 11
- vue-next-tick/ HOT 4
- props-destructure-vue-composition/ HOT 7
- ref-reactive-differences-vue/ HOT 5
- environment-variables-javascript/ HOT 3
- ref-in-vue/ HOT 1
- typescript-function-type/ HOT 5
- vue-v-model-form-inputs/ HOT 2
- react-forwardref/ HOT 4
- javascript-enum/ HOT 19
- react-comments/ HOT 8
- typescript-record/ HOT 10
- screen-window-page-sizes/ HOT 3
- javascript-pure-function/ HOT 1
- Great article
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dmitripavlutin.com-comments.