loading...
Eugene Karataev profile picture

Eugene Karataev

undefined is not a function

Location Russia, Novosibirsk Joined Joined on  Twitter logo GitHub logo

Last 250 comments

Don't await in loops

Actually, async works as expected in for loop. function wor...

Handling a lot of requests in JavaScript with promises

Well, timeout error may occur in natural way considering that...

Handling a lot of requests in JavaScript with promises

I'd go the easiest path at first - made requests recursively ...

Why I Stopped Using Redux

I'd love to stop using Redux, but it's very deep inside in my...

Set CSS styles with javascript

I don't think you ever need to use insertRule in your day-to-...

Set CSS styles with javascript

I'm not 100% sure what you're trying to achieve, but if you n...

Project Euler #5 - Finding the Smallest Multiple

Wrap your content with three backtics to render it as a code ...

"Hello, World!" but in 30 different languages!!!

Trying new languages is always fun. Last year I tried to imp...

TypeScript - get types from data using typeof

New TS Handbook has a mention about [number] syntax: const ...

A Simple Argument For Typescript

I really like TS, but I still prefer vanilla JS for small R&a...

Aha! Understanding Typescript's Type Predicates

All right, I found that TS has discriminated unions for such ...

Aha! Understanding Typescript's Type Predicates

Thanks for the type predicate explanation. But in my case TS ...

Docker Cheat Sheet

Thanks for the list. It seems that docker -l command doesn'...

Share Your Conway's Game Of Life

Here's my Life game. And the repo. I wrote it 5 years ago w...

Where’s the Sleep Function in JavaScript?

Each iteration in the above code runs much faster than 1ms....

Migrating to TypeScript, Part 2: Trust the compiler!

Wow, I didn't know about "Infer parameter types from usage"...

Exploring the Two Sum Interview Question in JavaScript

Great example of iterative approach to solve a problem. "Ha...

Exploring the Two Sum Interview Question in JavaScript

Sure, why not?

Tic Tac Toe with TypeScript - Part 1

It also has an added benefit of improving your IDE experie...

Get Started With TypeScript in 2019

Thanks for the great article! I'm new to TypeScript and cou...

Migrate to Typescript on Node.js

Thanks!

Migrate to Typescript on Node.js

Thanks for the great article! Typescript adopts the es6 i...

Handling a lot of requests in JavaScript with promises

Great question! Handling errors heavily depends on your par...

How to Set Up a React Project with Create React App

How to Set Up a React Project with Create React App ...

Comparing popular React component libraries

Couple of days ago I made a similar comparision of React UI...

How to create a 3 dimensional object with CSS only

Great stuff! Side note about images. I like funny gifs. Bu...

Visual Studio Code Extension For Taking Screenshot Of Your Codebase

I agree that code screenshots looks beautiful when created ...

DevTo - New Users Automatically Added To Followers List

Yeah, it's feature, not a bug πŸ˜€ ...

Stop using `console.log`, start using your DevTools πŸ› οΈ

Thanks for the good post. It's really annoying to dig throu...

My most used javascript methods.

They really helpful methods indeed. But I'd not throw away ...

Handling a lot of requests in JavaScript with promises

Thanks. Actually I saw a similar module with promise patter...

4 Ways to Convert String to Character Array in JavaScript

Thanks for the post! I didn't know that split method and spre...

No need to write change handlers for multiple React inputs!

For the cases when you don't need current input state for v...

Understanding Bits, Bytes, Bases, and Writing a Hex Dump in JavaScript

Thanks for the low level digging of how an information is r...

How To Build a Node.js Application with Docker [Quickstart]

Thanks for the great introduction to Docker! If you follow...

⭐️ Interactive JavaScript Quiz #2

2/3 This was a warm up question πŸ™‚ I thought that I'll fai...

⭐️ Interactive JavaScript Quiz #1

3/3! Thanks for the quiz and explanations. I really like yo...

What are CJS, AMD, UMD, and ESM in Javascript?

Can you please clarify? When CJS imports, it will give you ...

Take 'this' Quiz, Understand How 'this' Works in JavaScript

Thanks for the fun quiz. I was able to answer every questio...

Pitfalls of overusing React Context

Having one global context for an app is like providing a fu...

10 Array Methods You Should Know πŸ‘€

For me slice is nice and handy method to take a part of an ar...

Do You Still Use Var? If So Why?

I agree, this is a valid use case for var if you prefer imp...

Do You Still Use Var? If So Why?

Just define it in the parent scope. It has extra line if co...

Extend usage of styled-components in React

Well, if you don't want to add another SC component, you ca...

Extend usage of styled-components in React

Why not to use default components' extending mechanism prov...

Do You Still Use Var? If So Why?

Why is it necessary to use var instead of let in your examp...

Do You Still Use Var? If So Why?

I use var in devtools console, because with let/const I got...

Understanding positioning in CSS

Why is it static for default block position? For me static ...

NPX: work faster with npm package binaries

Thanks for the post. One question: can I say that command ...

I miss you, var.

Nowdays even const is considered as a mistake πŸ˜… ...

Sending messages with Telegram bot

Yeah, but in normal situation even if you don't add the bot...

Sending messages with Telegram bot

Oh, I think I figured out the difference in results between...

Sending messages with Telegram bot

The bot was in the group, but the request in Postman failed...

Sending messages with Telegram bot

Thanks for the tutorial. In my case for some reason POST an...

What's the best thing to do when you've run into a debugging dead end?

Start asking questions: Why am I doing this? Am I happy? I ...

DEV users landscape

Yes, something like this would be great see for DEV users.

DEV users landscape

Thanks 😊

DEV users landscape

Thanks! There is a nice overview of DEV users' location bas...

DEV users landscape

I have the same question. Several blank users in a row make...

DEV users landscape

πŸ€”

DEV users landscape

Thanks for the idea, I'll take a look.

DEV users landscape

Yeah, great idea and I guess it's not that hard in realizat...

Danger! Undefined ahead

I think hasOwnProperty method solves your case perfectly.

JS Array Manipulation Quirks

Well, actually if we execute your examples, we can notice t...

JS Array Manipulation Quirks

forEach doesn't mutate an array. Mutation happens only if y...

Technology stack for your blog in 2019

Thanks for sharing your stack, Paul. I think it's great to ...

Understanding Prototypal Inheritance in JavaScript : Part 1

I think if you're working with classes then dealing with pr...

JavaScript == VS === The truth

Thanks for the great post. Indeed type coercion is not obvi...

πŸ“· How to take a screenshot of a webpage with JavaScript in Node.js (using puppeteer)

Sure, puppeteer is great to automate routine tasks. I used ...

πŸ“· How to take a screenshot of a webpage with JavaScript in Node.js (using puppeteer)

Puppeteer indeed is a very powerful tool to work with webpage...

I Don't Know Javascript Coercion, Do You?

Type coercion is definitely one of the most confusing parts...

βœ¨β™»οΈ JavaScript Visualized: Event Loop

Thanks for the great article and animations! It's interesting...

Why it's so hard to check object equality in JavaScript

Thanks for the nice overview of objects comparison methods....

Hardest JavaScript Puzzle I've Ever Solved

One characher per line, 20 lines 🀣🀣🀣

Inheritance in JavaScript

Thanks for the reminder how inheritance works in JS. I'm gl...

Optional Chaining in JavaScript Right Now!

This is a clever use of Proxy to safely access object prope...

πŸ’ͺ Train your CSS skills with online games πŸ‘Ύ

A great example how you should not design and code user int...

Using Javascript Sets with React useState

But if you have to maintain a list in the state that requi...

Remove accidentally pushed file from a git repository history in 4 simple steps

I agree with Joe, use git push -f with caution. Warning: ...

Using Postman like a PRO with these tricks 😎

Thanks for the tip with env variables, I didn't know that πŸ™...

Using Javascript Sets with React useState

Thanks for showing that it's possible to use Set instead of A...

Who still regularly uses jQuery?

It's not always safe to use this trick to query an element....

JavaScript - The prototype chain in depth

Thanks for the great post. I like your way of explaining th...

Recursion

I left my comment in post below ...

19 Takeaways From React Conf 2019

Thanks for the post. Number 14 resonated with me deeply, be...

Confused by JavaScript's const? Me too!

I agree that under the hood there are pointers, memory allo...

With great prototype power comes great responsibility

Yeah, thanks for mentioning this method. But using hasOwnPr...

πŸ€”Pop Quiz! Which of these is an infinite loop?

I still have one use case for var - a browser's developer t...

Javascript in a Ninja Way

Nice list. In the last example I prefer to use [1,2,3].inc...

Writing is Thinking: Learning to Write with Confidence

Great post! It's very often when I think I know a topic, bu...

Flow, a path to happiness

My first reaction to the title was: hmm, I thought TypeScri...

All (or just most) of what you need to know about handling Promises

Yeah, as Joel mentioned, you can return promises to get one...

All (or just most) of what you need to know about handling Promises

What's the reason to have promise hell in the first example...

My Top Plugins for a GatsbyJS Powered Blog

I can add these two plugins that make my life easier: gatsb...

πŸ”₯ Learn React in 10 Tweets (with hooks)

Btw, I still prefer to use class components instead of hook...

πŸ”₯ Learn React in 10 Tweets (with hooks)

I see only one change of modern React compared to React 3 y...

Discovery.js tutorials: quick start

This is a great tool to analyze JSON data. TIL that it's no...

ELI5: Git Rebase vs. Merge

It's possible to backtrack to specific commits and git-bise...

Understanding Gatsby's Lifecycle

Great post, finally the explanation of of gatsby-*.js files...

Can You Replace Redux with React Hooks?

Thanks for the post. I agree that redux seems to be the best ...

Why you should stop declaring variables inside a for loop (especially in JavaScript)

In Javascript, there isn't a Garbage collector system, so ...

Is Blogging Useful?

I'm doing my first steps in blogging and your article is re...

Why do we need to bind methods inside our class component’s constructor?

Why React doesn't bind functions internally? It seems it's no...

My 5 favorite resources for learning JavaScript

MDN is Wikipedia for JavaScript

Top 5 DEV Comments from the Past Week

Amazingly awesome! πŸ€“

Sets in JavaScript

Agree. Sets also don't have array methods like map/filter/r...

Sets in JavaScript

Why? We can use forEach method on Sets to iterate the colle...

β€œhref” vs. β€œsrc” in HTML

The League of (Five) Extraordinary Javascript Resources

Thanks for the links! Now I know what content I can fill my...

JavaScript: Creeping into this (Exercise)

That was a tough adventure. Couple of my answers were wrong...

Getting more value from reading

I liked that "Case of the Weeping Mermaid" has it's place a...

Why (! + [] + [] + ![]).length is 9

If I'm not sure what's going on with the JS code, I use AST...

What 10x engineer means?

10x engineer writes 80% of code while others are busy on meet...

Happy Birthday Ali Spittel

Happy birthday, Ali! πŸŽ‰πŸŽ‰πŸŽ‰

What makes you choose the language you write your articles in?

I have the same goals when I write articles in english. Als...

A few JavaScript puzzlers

Good puzzles to think about. Couple minutes of thinking a...

Lexical Environment-the hidden part to understand Closures

Nice explanation of internal JavaScript processes. Also I can...

So you think you know JavaScript?

Great post, would like to see more like this πŸ‘ My answers t...

Who is JSON?

I also find it valuable to stringify JSON in a readable for...

I tried 10 programming languages and I liked it

Thanks, this is really insightful. My perception of assembl...

I tried 10 programming languages and I liked it

Are you serious? Programs written with Assembler are long a...

I tried 10 programming languages and I liked it

Hehe, I think that in this case the post'd take a couple of...

Everything you need to know about Node.js

Well, if a separate worker and main thread are executed in ...

I tried 10 programming languages and I liked it

I know JavaScript only. Most of other languages in this pos...

I tried 10 programming languages and I liked it

Go next time πŸ˜‰

Some people try to solve problems using threads...

Sometimes async I/O is not enough. What about heavy CPU cal...

Everything you need to know about Node.js

Thanks for the great post! Let's say I need a worker to do...

I tried 10 programming languages and I liked it

Yep, maybe it was not a good idea to inject repl.it sandbox...

What's one thing you wish you knew before you started programming?

Try every possible way of learning you can find, but stick to...

Don't miss out on css variables

Settings -> misc -> style customization

The Best Book to Read as a Developer

This book is what I've been looking for!

Svelte is the most beautiful web framework I've ever seen

I tried the official tutorial and having full component def...

The Three Most Common Refactoring Opportunities You Are Likely To Encounter

I am a huge fan of the DEV community. If you have any ques...

How to publish a PWA on the Google Play store

Thanks for the post! Is there any chance to upload PWA to t...

Understanding Generators in Javascript - Javascript weekly

Conditions functions should exist somewhere. I think it's a...

Understanding Generators in Javascript - Javascript weekly

Thanks for the example. The same result might be achieved b...

Svelte is the most beautiful web framework I've ever seen

Thanks for the addition, my interest to Svelte grows up with ...

Svelte is the most beautiful web framework I've ever seen

Thanks for the answer, it's much clearer now. I guess I nee...

Svelte is the most beautiful web framework I've ever seen

I know nothing about Svelte, so two noob questions. Svelte ...

What is your favourite Git command?

Yep, WebStorm also has this handy feature showing an author...

Understanding Generators in Javascript - Javascript weekly

I thought generators is more like a funny toy in javascript...

Tips and Tricks for Better JavaScript Conditionals and Match Criteria

Nice tips! It should be kept in mind that some features fro...

Compiling vs Polyfills with Babel (JavaScript)

I've learned the difference of transpiling vs polyfilling w...

What advice would you give your 20-year-old self?

+100 for open mind. I had mental blocks for many categories o...

JavaScript and Scope VI - Closures

Thanks for the great series explaining how scopes work in J...

What was the moment you realized you weren’t such a newbie anymore?

I have this feeling when I read other devs code and see man...

Confused by JavaScript's const? Me too!

Yes, objects are passed by reference, but there are no poin...

THE best git commands

This post by Christopher Kade with practice examples of how...

Typescript: First thoughts

You keep saying that you can eliminate extra KB in js by co...

How to Get Smarter Without Knowing Anything

Sure, I'd be happy if you update your post with my comment!

Typescript: First thoughts

Processing media files and js files is very different for a...

How to Get Smarter Without Knowing Anything

Thanks for the great post! I want to add that it's really i...

Typescript: First thoughts

If I had a need for a modern typed javascript variant I wo...

How to navigate complex objects in 1 line of js

Great one-line helper! I think the post misses the the moti...

Become the junior developer that companies want to hire.

Great thorough article how to build a software developer ca...

The math behind reading 30 books per year

I prefer to listen audiobooks while on my way to work/home....

Learning to love software development books πŸ’™

I read a lot of technical books when I was starting program...

Learning to love software development books πŸ’™

Never heard about "Land of Lisp" book before, but the Music...

Up your Git game and clean up your history

Thanks for the post, very good practical examples to try re...

Demystifying Array.prototype.flat

I'm nitpicking here, but arr.flat(1) === arr.flat() ...

Should a button communicate the current state, the intended behavior, or both?

What about touch devices? They don't have hover effects.

Interview Question Journey - Currying, Closures, Type Coercion, oh my 😱

Thanks for sharing, I like how you go deeper with add funct...

If you had to live with only 5 dev tools, what would they be?

Yeah, Redmine is little bit outdated, but it's superfast. I...

Interview Question Journey - Currying, Closures, Type Coercion, oh my 😱

Wow, thanks for the such detailed comment! I did not think ...

If you had to live with only 5 dev tools, what would they be?

PHPStorm Git Npm Browser dev tools Redmine/jira

Interview Question Journey - Currying, Closures, Type Coercion, oh my 😱

Well, I was not happy with this task as well. It took me ab...

Sets in JavaScript

Is it correct to say that Set is like array, but with uniqu...

Sets in JavaScript

AFAIK, Set.has implementation in V8 is really fast - it has...

Refactoring JavaScript for Performance and Readability (with Examples!)

I prefer the refactored code, because from the variables na...

Demystifying "const" variables in JavaScript

Thanks for the post. I use const only for constants in top-...

My Top 10 Programming Proverbs

There is also The Zen of Python

If Javascript Is Single Threaded, How Is It Asynchronous?

Ahaha, awesome! πŸ˜‚

What's your preferred method for inserting DOM elements in vanilla JS?

Handling complex DOM manipulations with vanillaJS is tough....

Using arrow functions might be costing you performance

Agree!

Using arrow functions might be costing you performance

In my test run the results are almost the same for all thre...

If Javascript Is Single Threaded, How Is It Asynchronous?

It also poorly works with floats (ex. [1.5, 1.4, 1.3, 1.2, ...

If Javascript Is Single Threaded, How Is It Asynchronous?

Well, it's a joke and shouldn't be used anywhere in product...

If Javascript Is Single Threaded, How Is It Asynchronous?

I like asynchronous nature of javascript because it helps me ...

3 React Interview Questions for Junior Devs

Thanks for the post, I think all three questions are good t...

Anybody still working with jQuery?

Yeah, my current project is on the bleeding edge of technol...

JavaScript : What happens with the browser ?

And then finally we have another little mini program calle...

How do you limit or avoid procrastination?

Is it correct to consider dev.to as social media for develo...

You don't have to use Redux

According to the comments, it seems the only way to structu...

You don’t always need to import React

Here's a dirty hack to avoid importing React in every file ...

Using arrow functions might be costing you performance

Actually jsPerf shows that arrow functions with implicit re...

A lazy developer is a good developer, 10 windows shortcuts you should know

Great list of shortcuts! I also use Win + L everyday to bl...

Project Euler #7 - 10001st prime

JS function getPrimes(max) { let arr = new Array(max).fil...

Project Euler #5 - Finding the Smallest Multiple

You do agree that the problem is implicitly asking you to ...

Project Euler #5 - Finding the Smallest Multiple

Let's follow your algorithm for the range 1 to 10 (for simp...

Project Euler #5 - Finding the Smallest Multiple

I like your way of thought and clean explanation. It's grea...

Project Euler #5 - Finding the Smallest Multiple

+1 for 'think before you act'. I wrote my initial comment ...

Project Euler #5 - Finding the Smallest Multiple

I really like "make it work, then make it fast" approach. F...

What's something you couldn't work without?

That makes sence, thanks.

What's something you couldn't work without?

I'm just curious what's the benefit of having 8 open termin...

What's something you couldn't work without?

+1. For some reason couple of days ago SO wasn't available ...

Project Euler #5 - Finding the Smallest Multiple

Bruteforce node solution 🀣 const assert = require('assert')...

Three Arguments for Why You Should Write More

Great post, thanks. I've indeed noticed that day-to-day wri...

CSS games are fun!

It's mindblowing that it's possible to add such level of in...

What is your favorite interview question?

What were your last pain and how did you overcome it?

What are you reading right now?

The Disappearing Spoon by Sam Kean. A wonderful journey to ...

Web Application Frameworks

AngularJS, but not Angular? React + ecosystem?

Terrible interview question: Swap variables without a temporary

This solution looks good, but it doesn't qualify for the re...

DevTools - My Favorite Tips and Tricks

When debugging I like to clear the noise in network tab by ...

What are your worst coding habits?

It's hard for me to work with poorly written legacy code. F...

Top Insights on Technical Interviews, From the Perspective of a Technical Interviewer

Sorry, I can't understand your reply clearly. I mean that i...

Top Insights on Technical Interviews, From the Perspective of a Technical Interviewer

The interviewer isn't allowed to intervene if you start an...

My Favorite Data Visualization and Dataset Resources

I really like observable tool for visualizing data. For exa...

What are you "old enough to remember" in software development?

I remember building games in Borland Delphi. Creating inter...

I have been programming since I'm 10, Ask Me Anything!

In my experience Google bot is able to crawl content even f...

Write faster JavaScript

You say that it's good for performance to reuse functions (re...

Write faster JavaScript

I agree that performance matters. But premature optimization ...

I have been programming since I'm 10, Ask Me Anything!

I haven't heard about prerender-spa-plugin before, will giv...

I have been programming since I'm 10, Ask Me Anything!

What tools do you use to prebuild your Vue.js applications ...

Solving Puzzles With High-Performance JavaScript

Thanks for the illustration how to solve problems iterative...

In your opinion, what is the most confusing part of JavaScript?

It's a very rare case when you work on a project alone. Oth...

I've been coding for 20 years, Ask Me Anything!

Do you want to be a PHP developer for another 20 years?

In your opinion, what is the most confusing part of JavaScript?

Type coercion is definitely not obvious in JavaScript []...

How to choose the best structure for react applications?

Dan Abramov wrote a comprehensive guide how to structure Re...

How to copy props in react dev tools

Nice tip! There is also an easier way - just right-click on...

Learn React JS in 5 minutesβ€Šβ€”β€ŠA tutorial for beginners

Nice introduction to React. The reason we’re writing {thi...

Joining the DEV team βœ…

Congratulations, Anna!

A Tiny Project, From Inception to Deployment

Great post describing the full process from idea to product...

Bubble Sort In JavaScript

Yeah, visualgo is a great resource to grasp algorithms by v...

ELI5: How does someone write a new computer language?

Thanks!

ELI5: How does someone write a new computer language?

Do all compilers transform source code to AST? Are there a...

Bubble Sort In JavaScript

Two years ago on interview I was asked to write bubble sort o...

If you could change one thing about learning to code, what would it be?

I think my biggest mistake was to read a lot instead of pra...

ELI5: Git Rebase vs. Merge

I might be miss something, but I always merge. What is the ...

I failed last onsite step of Facebook interview at Dublin, Ask Me Anything!

How long have you been programming in Ruby before interview...

A Primer on Basic Electronics and Circuits

Great introduction post, looking forward for the next tutor...

What is State in React?

With hooks it's possible to have state in functional compon...

I Computer Science Student in Israel, Ask Me Anything!

What is the preferred career path among students after grad...

I am a software consultant, Ask Me Anything!

Let's say I'm a product owner and I have a project and a team...

Linting in JavaScript with ESLint

The npm script "lint": "./node_modules/.bin/eslint ./src" c...

What are your favorite programming metaphors for non-technical folks?

This is a nice illustration of over-engineering.

The issue with export default

Stop using export default. Other team members import your ...

Skill as a Function of Interest

Wow, 497 projects in Scrath 🀯 That's impressive!

I'm a senior "DevOps" consultant in the Midwest, Ask Me Anything!

Thanks for the detailed reply!

I'm a senior "DevOps" consultant in the Midwest, Ask Me Anything!

How your typical day looks like? I know nothing about DevOp...

Free book to learn JavaScript

Why? You can read the book's content with no charge on GitH...

When npm tells you you're hosed

I used yarn when npm didn't have package-lock by default. N...

React Visualization Libraries in 2019

Thanks for sharing. I used react-vis for one project and it...

My Top 3 JavaScript Array Methods

+1 for map. It's a really great and clean method to transfo...

Push git cloned repository to your own on GitHub

It's not necessary to remove old origin and create a new on...

Formatting dates with JavaScript

Oh, I'll definitely take a look at your next article to che...

Formatting dates with JavaScript

Many times I started projects without dates libraries depen...

React Visualization Libraries in 2019

So, what graph library have you selected for your project a...

Thoughts on migrating to TypeScript and improving the overall quality of the frontend DEV codebase

Oh, I didn't know that I can run typescript compiler on jav...

loading...