DEV Community

Cover image for Demystifying the JavaScript call stack

Demystifying the JavaScript call stack

Johnson Ogwuru on September 13, 2019

JavaScript is a single-threaded, single concurrent language, meaning it can handle one task at a time or a piece of code at a time. It has a single...
Collapse
 
chrisachard profile image
Chris Achard

Nice writeup! The call stack is something that I don't really know how it works, but always feel like I should 🤣So this helps.

BTW, a quick tip if you want neat syntax highlighting on your examples, you can put javascript in your code examples, like this:


```javascript
```

To get highlighted output like this:

  let generatedFunc = function(num) {
    return num * 2;
  };

Good post!

Collapse
 
ogwurujohnson profile image
Johnson Ogwuru

Yeah, you should 🤣. Thanks for the tip, have applied it now.

Collapse
 
kwamikudjie profile image
Kwami Kudjie

Great article!!!

Collapse
 
ogwurujohnson profile image
Johnson Ogwuru

Thank you

Collapse
 
apol0x profile image
Apol0x

I've to read the article or some sections more than once time, but "non ti preocupare" It was for my english hehe. Nice post,man, so illuminating and interesting ;)

Collapse
 
ogwurujohnson profile image
Johnson Ogwuru • Edited

Hehe, I'm glad you enjoyed it. Thanks alot, for teaching me an Italian phrase... 'non ti preocupare'(no worries) 😁

Collapse
 
nedsoft profile image
Chinedu Orie

Inside Javascript. Nice read!

Collapse
 
ogwurujohnson profile image
Johnson Ogwuru

I'm glad you enjoyed it chinedu

Collapse
 
isherwood profile image
Clint Buhs

Very nice. Thank you. I've been developing JavaScript for most of a decade and the call stack still holds mystery. I appreciate the explanation.

One pedantic suggestion: "encase" -> "in case"

Collapse
 
ogwurujohnson profile image
Johnson Ogwuru • Edited

Thanks, Clint. And Good catch too.