JavaScript

How to find the version of a globally installed NPM package

Sometimes, you really want to know the version of a globally installed NPM package. That’s the position I found myself in this morning. Googling didn’t help me much. Most of the answers I found just didn’t answer my question. Here what you need to know. If you want to see

JavaScript Array Push Performance

This is a short response I wrote to a question on /r/javascript. The user who asked it was curious whether there would be any performance difference between adding elements to a JavaScript array by calling push, or manually adding a new object to an array by making a call like myArray[myArray.length]

JavaScript indexOf vs includes performance

This is a short response I wrote to a question on /r/javascript. The user who asked it was curious whether there would be any performance difference between using a JavaScript string’s indexOf vs includes performance when trying to find a substring within a larger string.  Let’s take a look at the ECMAScript

How do JavaScript arrays work under the hood?

Front-end and full-stack developers use JavaScript arrays every day. Most of them, however, haven’t done a deep dive to understand how JS arrays are implemented in native code. Not doing this doesn’t mean you’re a bad developer. It’s entirely possible to use JavaScript effectively without digging in to understand how

© 2023 Ryan Peden . Powered by WordPress. Theme by Viva Themes.