---
title: "Steven Olsen (@srjsdev) | Hashnode"
description: "Online educator and mentor for Sr. JS developers. Read the latest articles by Steven Olsen on Hashnode."
url: "https://hashnode.com/@srjsdev"
---

@srjsdev

# Steven Olsen

@srjsdev · Joined October 2022

Online educator and mentor for Sr. JS developers

## Comments

[This is a really great tool, ❤ it! I think the URL https://sandworm.dev/npm/package/foobar is really awesome too, and well implement. Bravo 👏👏](https://hashnode.com/posts/the-better-npm-audit/64171e6b2826f6eb708790ae/comment/641a7a06e592dd06478df193)

Comment · Article · Mar 22, 2023 · [The Better Npm Audit 🪱](https://hashnode.com/posts/the-better-npm-audit/64171e6b2826f6eb708790ae)

[I've had requests to see my sw.js file, so here is a link to it in production: https://wheely.today/sw.js](https://hashnode.com/posts/let-service-workers-help-speed-up-your-site-performance-by-10x/640687a8860514a17644339e/comment/640796746c8cbdd4116b7dc0)

Comment · Article · Mar 7, 2023 · [Let Service Workers Help Speed Up Your Site Performance by 10X](https://hashnode.com/posts/let-service-workers-help-speed-up-your-site-performance-by-10x/640687a8860514a17644339e)

[Some good SW references to get started: https://web.dev/offline-cookbook/#generic-fallback https://web.dev/offline-cookbook/#stale-while-revalidate](https://hashnode.com/posts/let-service-workers-help-speed-up-your-site-performance-by-10x/640687a8860514a17644339e/comment/64076bbbc9fcfad4416331e7)

Comment · Article · Mar 7, 2023 · [Let Service Workers Help Speed Up Your Site Performance by 10X](https://hashnode.com/posts/let-service-workers-help-speed-up-your-site-performance-by-10x/640687a8860514a17644339e)

[New and exciting updates with package.json and NodeJS API compatibility: https://deno.com/blog/v1.31](https://hashnode.com/posts/deno-features/63dc1b714a501f8c0dea7111/comment/64013b2352d0c16bb2221d1a)

Comment · Article · Mar 3, 2023 · [3 New Features of Deno that Most JS Devs Don't Know About](https://hashnode.com/posts/deno-features/63dc1b714a501f8c0dea7111)

[Bonus tip: how to turn your POO (plain old object) into an iteratable array! const obj1 = {a: 1, b: 2}; obj1.\_\_proto\_\_\[Symbol.iterator\] = function\* () { for (const k in this) yield \[k, this\[k\]\]; } for (const e of obj1) console.log(e.join(":")) // a:1 // b:2](https://hashnode.com/posts/101-ways-to-work-with-arrays-in-javascript/63b32f68ff3b3100c0927696/comment/63d155ee5ddbc4f31e812089)

Comment · Article · Jan 25, 2023 · [101 Ways to Work with Arrays in JavaScript](https://hashnode.com/posts/101-ways-to-work-with-arrays-in-javascript/63b32f68ff3b3100c0927696)

[Here are more examples of what you can do with generator functions--efficient number ranges, and how to convert generators into arrays: https://gist.github.com/crazy4groovy/4d871aadad1d71754a863e92f119c489](https://hashnode.com/posts/javascript-generator-functions/63caef2e05b5642ef9e813c0/comment/63cf095db0e841d4136d9866)

Comment · Article · Jan 23, 2023 · [Generator Functions: Zero to Hero](https://hashnode.com/posts/javascript-generator-functions/63caef2e05b5642ef9e813c0)

[For an IFace1 object, if you call Object.keys() on it, it will always return an array with "NotOptional" it it. Not so with IFace2. Like you said, in practical terms that's mostly useful for memory allocation. But sometimes there can also be subtle implications as well; kinda like the difference between null and undefined.](https://hashnode.com/posts/why-isnt-string-allowed-as-a-function-return-value-in-typescript/637a4b43c46e4988cb20260b/comment/63cb0f12587fc59d3cd73e8e)

Comment · Article · Jan 20, 2023 · [Why isn't "string?" allowed as a function return value in TypeScript?](https://hashnode.com/posts/why-isnt-string-allowed-as-a-function-return-value-in-typescript/637a4b43c46e4988cb20260b)

[One of my favourite util functions using Array.from: const listRange = (begin, end, inc = 1) => Array.from({ length: Math.ceil((end - begin) / inc) }, (\_, i) => begin + i \* inc); // console.log(listRange(0, 4, 1)); // \[0, 1, 2, 3\] // console.log(listRange(0, 4)); // \[0, 1, 2, 3\] // console.log(listRange(1, 10, 2)); // \[1, 3, 5, 7, 9\]](https://hashnode.com/posts/101-ways-to-work-with-arrays-in-javascript/63b32f68ff3b3100c0927696/comment/63b5d83573ee0387bc7a8f07)

Comment · Article · Jan 4, 2023 · [101 Ways to Work with Arrays in JavaScript](https://hashnode.com/posts/101-ways-to-work-with-arrays-in-javascript/63b32f68ff3b3100c0927696)

[Very honest and perceptive! I too have had similar thoughts on the topic. This is well articulated. Thanks for sharing.](https://hashnode.com/posts/the-path-to-staff-engineer/6388fe6a4cd1e7e4110845b3/comment/638c26af64b7288d8d8e4f89)

Comment · Article · Dec 4, 2022 · [The path to staff engineer](https://hashnode.com/posts/the-path-to-staff-engineer/6388fe6a4cd1e7e4110845b3)

[I just learned that there's an npm lib that implements this as well (if you wanna be lazy like the tree raccoon in that image lol): https://www.npmjs.com/package/cachified Very hot topic!](https://hashnode.com/posts/async-promise-cache-invalidation-strategies/638a5366b343d198d56cc8d0/comment/638a790c1338cf81a8765601)

Comment · Article · Dec 2, 2022 · [Async Promise cache PART 2: Invalidation strategies (with solutions!)](https://hashnode.com/posts/async-promise-cache-invalidation-strategies/638a5366b343d198d56cc8d0)
