r/JavaScriptTips • • Dec 24 '25

🎤 Got a story about JavaScript or modern full-stack development?

1 Upvotes

Make “speak at a top tech conference” one of your New Year’s resolutions!

Take the stage at JSNation and share your experience with thousands of developers eager to learn from you.

✨ Amsterdam + Online

 🔥Submit your talk: https://gitnation.com/events/jsnation-2026/cfp


r/JavaScriptTips • • Dec 19 '25

Extract a Substring from a String

0 Upvotes

What will be the following code output?

let text = "JavaScript is awesome!"; let result = text.slice(0,9);

console.log(result);

7 votes, Dec 24 '25
2 JavaScript
4 javaScrip
0 Java
1 awesome

r/JavaScriptTips • • Dec 17 '25

how can you find the position of a subtracting in a string?

3 Upvotes

To find the position of a substring (like "subtracting") in a string using JavaScript, use the indexOf() method. This method returns the index (position) of the first occurrence of the substring, or -1 if it is not found.

How to Use indexOf() Write your string and call .indexOf("substring") on it.The method returns the starting index of the substring, counting from 0


r/JavaScriptTips • • Dec 14 '25

UNABLE TO GRASP THE CONCEPT IN PROGRAMMING

Thumbnail reddit.com
1 Upvotes

r/JavaScriptTips • • Dec 11 '25

CLI tool that scans your entire codebase for environment variable issues and more

2 Upvotes

Hello everyone,

I recently built a tool that I personally needed for my own projects, and now I’m super curious if other developers would actually find it useful.

It’s called dotenv-diff, and the main feature is a codebase scanner that finds problems with environment variables before they break things.

Why I built it

I kept seeing the same issues in real projects:

  • Feature breaks because .env is missing variables

  • New developer joins → app crashes due to missing env

  • .env.example goes out of sync

  • Someone accidentally leaves a secret inside a TS file

  • Frontend frameworks misused env naming (NEXT_PUBLIC, VITE_, etc.)

I wanted one CLI command that gives me a full health check of environment usage in my project.

Honest question:

Would this be useful in your workflow?

If you want to check it out:

npm package: https://www.npmjs.com/package/dotenv-diff
Docs: https://dotenv-diff-docs.vercel.app
Github: https://github.com/Chrilleweb/dotenv-diff


r/JavaScriptTips • • Dec 08 '25

Shai-Hulud 3.0 😈 is coming. The only question is: will your defenses be ready?

Post image
0 Upvotes

Version 1.0 stole credentials quietly. Version 2.0 added self-healing and a destructive fallback that wipes entire directories.

Version 3.0? 😨 It's already being written by attackers
who learned exactly what worked.

How do you prepare for it?


r/JavaScriptTips • • Dec 03 '25

I built a modern Mermaid.js editor with custom themes + beautiful exports — looking for feedback!

Post image
2 Upvotes

r/JavaScriptTips • • Dec 02 '25

[AskJS] What are the best free JavaScript courses & resources to learn from beginner to expert?

Thumbnail reddit.com
1 Upvotes

r/JavaScriptTips • • Dec 01 '25

MINECRAFT SERVER

Post image
3 Upvotes

r/JavaScriptTips • • Nov 29 '25

React Compiler: How It Actually Works

Thumbnail medium.com
1 Upvotes

React Compiler isn’t magic. It’s a build-time tool that does something simple: it reads your code and automatically wraps expensive computations so they don’t run every render. That’s it. The “how” though? That’s where it gets interesting.


r/JavaScriptTips • • Nov 27 '25

Shai-Hulud 2.0 npm worm

Post image
17 Upvotes

New wave of npm supply chain attack launched November 21. Moved from postinstall to preinstall, adds self-healing via GitHub search, and includes destructive fallback that wipes home directories if exfiltration fails.

Still spreading, new infections every 30-40 minutes.

Pin dependencies to pre-Nov 21 versions, scan for setup_bun.js/bun_environment.js/verify.js, rotate NPM tokens and GitHub credentials, check for rogue self-hosted runners.


r/JavaScriptTips • • Nov 26 '25

After getting frustrated with bookmarking 20 different dev tool sites, I built my own hub

71 Upvotes

Hey everyone,

I got tired of juggling multiple bookmarks for simple tasks like formatting JSON, decoding JWTs, or converting Base64. So I built a single hub for all of them.

**What it includes:**

- JSON Formatter/Validator

- JWT Decoder & Visualizer

- Base64, URL, HTML Encoders/Decoders

- UUID Generator

- Regex Tester

- Color converters

- And 30+ more utilities

**Key points:**

- 100% client-side - nothing is sent to any server

- No sign-up, no ads, no tracking

Link: https://engtoolshub.com

I'd genuinely appreciate any feedback - what's missing? What could be improved? What tools do you use daily that I should add?

Thanks!


r/JavaScriptTips • • Nov 27 '25

What is your opinion on new static type syntax suggestion in Javascript?

Thumbnail reddit.com
1 Upvotes

r/JavaScriptTips • • Nov 25 '25

Every Javascript Concept Explained in 12 Minutes

Thumbnail
youtu.be
6 Upvotes

r/JavaScriptTips • • Nov 24 '25

I built SnapText because I was tired of typing the same emails 50 times a day

Thumbnail
chromewebstore.google.com
1 Upvotes

r/JavaScriptTips • • Nov 21 '25

The Lighthouse Quick Start: Everything Beginners Need in 10 Minutes

Thumbnail medium.com
3 Upvotes

r/JavaScriptTips • • Nov 21 '25

Lighthouse Guide: From Manual Audits to CI/CD Automation (with code examples)

Thumbnail medium.com
2 Upvotes

I recently dove deep into Lighthouse for a frontend interview prep series I'm writing. Ended up learning way more than I expected, especially around automation.

I tried to make it beginner-friendly but practical enough for production use. Includes actual configs and code snippets you can copy-paste.

Anyone here running Lighthouse in CI? Would love to hear how you've set it up!


r/JavaScriptTips • • Nov 20 '25

Hiring Frontend Developer Intern (Maharashtra Only) | Remote-Friendly

Thumbnail reddit.com
1 Upvotes

r/JavaScriptTips • • Nov 18 '25

Tip: Understanding JS memory management changed the way I code

4 Upvotes

Quick tip for anyone working with JavaScript (frontend or Node):
Most of us think JS doesn’t handle memory well. I did too — until I learned how it actually manages memory.

Key takeaways:

  • How stack vs heap works

  • What reachability means

  • Why the Mark-and-Sweep algorithm matters

  • Why circular refs don’t necessarily cause leaks

  • Common patterns that cause real leaks (timers, event listeners, global refs)

If you’d like the full breakdown with examples and explanations in plain English:
https://medium.com/@ratheshprabakar/i-was-completely-wrong-about-javascript-memory-management-until-i-learned-this-8e3cae6983b8


r/JavaScriptTips • • Nov 17 '25

Encuentra mejoras en mi cĂłdigo

Thumbnail reddit.com
1 Upvotes

r/JavaScriptTips • • Nov 13 '25

Need help figuring out why this script stopped working

1 Upvotes

I have a script used to enable keyboard chapter navigation on a manga site I frequent. This script used to work, but no longer works at this time.

// ==UserScript==
// @name         NatoManga Keyboard Navigation
// @namespace    http://tampermonkey.net/
// @version      2.0
// @description  Keyboard Navigation on MangaNato pages (when reading)!
// @author       Arctiic
// @match        *://*chapmanganato.com/*
// @match       https://natomanga.com/*
// @match       https://mangakakalot.com/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=chapmanganato.com
// @grant        none
// @namespace   Violentmonkey Scripts
// ==/UserScript==

// for &
function htmlDecode(input){
  var e = document.createElement('div');
  e.innerHTML = input;
  return e.childNodes[0].nodeValue;
}
var regex = /href="([^"]*)/gm;
//var regex = /.*/gm;
if (!doc.length){
  var doc = document.getElementsByClassName('group_page')
}
doc = doc[0].innerHTML
var elements = [...doc.matchAll(regex)];
var prev = htmlDecode(elements[elements.length-4][1]);
var next = htmlDecode(elements[elements.length-3][1]);
document.addEventListener("keydown", keyDownTextField, false);
  function keyDownTextField(e) {
      var search = document.getElementsByClassName("searchinput")[0];
      if (document.activeElement !== search) {
          switch (e.which) {
              case 37: // "Arrow Left"
                  console.log('left');
                  window.location.href = prev;
                  break;
              case 39: // "Arrow Right"
                  window.location.href = next;
                  break;
              default:
                  return; // exit this handler for other keys
          }
          e.preventDefault(); // prevent the default action
      } else if (e.which == 32) {
          search.value += " ";
          e.preventDefault();
      }
      return;
  }


//sets an event listener to document, gets called whenever you press a key on the page, passing the event details into the callback function

//checks if the key is the key you want, replace it with whatever key you want to bind it to
//old code...
//document.addEventListener("keydown", function(r,l){
//    if(r.key == "ArrowRight"){
        //clicks the button
//        document.querySelector("a.navi-change-chapter-btn-next.a-h").click();
//    while(l.key == "ArrowLeft"){
//        document.querySelector("a.navi-change-chapter-btn-prev.a-h").click();
//    }
//}});

Can anyone help me out? Thanks!


r/JavaScriptTips • • Nov 11 '25

A New Tool For Developers & Programmers

1 Upvotes

Real talk—I've been using Blink for a few weeks now and it's legitimately one of the best productivity tools I've picked up as a dev.

Whether it's generating clean, well-commented code, helping me think through tricky logic problems, or just speeding up documentation writing, this thing is solid. It understands developer needs and doesn't feel like bloatware.

If you're constantly juggling multiple projects or just want to reclaim some time in your week, I'd seriously recommend trying it out. The learning curve is basically zero.

Anyway, if you want to give it a go, check it out here. It also has a free plan, BTW!

Drop a comment if you end up trying it—curious what other devs think!


r/JavaScriptTips • • Nov 11 '25

JavaScript Fundamentals: A Comprehensive Guide

Thumbnail thedevspace.io
1 Upvotes