r/JavaScriptTips • • Nov 21 '24

Analyzing Graph Data Structures in JavaScript Visualization

Thumbnail
medium.com
0 Upvotes

r/JavaScriptTips • • Nov 21 '24

help me with the JAVASCRIPT code

0 Upvotes

so i hv been trying to learn JS & practice in Vishual Studio Code....i am trying to run a simple JS program but in shows me syntax error in <!DOCTYPE html>...remember this pgm runs good on online compiler but not in vishual studio code..i have installed node js already

it displays the following

<!DOCTYPE html>
^

SyntaxError: Unexpected token '<'

r/JavaScriptTips • • May 25 '25

WHAT ARE THE CURRENT TECHNOLOGIES WE SEE IN JS ANIMATION PORTFOLIOS, WEBSITES , Give the opinions

0 Upvotes

What are the current technologies used in current fully animated websites, is it react ___ … etc ?


r/JavaScriptTips • • Aug 05 '25

Hello, I have a problem with an animation

0 Upvotes

Here is my code, the goal is simple, display an element with a small opacity magnet, and make sure that when it is not displayed it does not take up space, but here it does not work, thank you for your precious helpHere is my code, the goal is simple, display an element with a small opacity magnet, and make sure that when it is not displayed it does not take up space, but here it does not work, thank you for your precious help :

<!DOCTYPE html>

<html lang="fr">

<head>

<meta charset="UTF-8">

<title>Apparition avec fondu</title>

<style> \#box { opacity: 0; display: none; transition: 1s; background: lightblue; padding: 1em; margin-top: 1em; } </style>

</head>

<body>

<button id="btn">Afficher</button>

<div id="box">Je suis animé en fondu</div>

<script> const btn = document.getElementById('btn'); const box = document.getElementById('box'); btn.addEventListener('click', () => { // Étape 1 : afficher (affiche d'un coup, mais invisible car opacity 0) box.style.display = 'block'; // Étape 2 : attendre une frame, puis lancer l'opacité requestAnimationFrame(() => { box.style.opacity = '1'; }); }); </script>

</body>

</html>


r/JavaScriptTips • • Sep 23 '26

📣 React Summit Asia 2027: Call for Presentations is open!

Post image
0 Upvotes

Share your talk or workshop with hundreds of developers on Full-Stack Architecture, AI-Assisted Coding & AI Engineering, Growing to Senior/Tech Lead, etc.

📍 April 15 & 19, Singapore
Submit by Jan 12: https://gitnation.com/events/react-summit-asia/cfp


r/JavaScriptTips • • Apr 18 '24

[AskJS] What happened with the "time spent in each line" when using the Performance Tab on Chrome/Edge? Is there any plugin replacement or any configuration?

0 Upvotes

r/JavaScriptTips • • May 14 '23

10 JavaScript One Liners to save 1000+ hours

Thumbnail
youtube.com
9 Upvotes

r/JavaScriptTips • • Aug 17 '24

Should I learn Javascript from MDN or W3Schools?

Post image
22 Upvotes

r/JavaScriptTips • • Jun 14 '23

Quiz 💡 What will be the output of the following code snippet and why?

Post image
10 Upvotes

A. true B. false


r/JavaScriptTips • • Oct 09 '25

“Promise.all vs allSettled vs race vs any” — Which one do you actually use in real projects?

5 Upvotes

I’ve seen this question (and mistake) pop up so many times:
A dev wraps multiple API calls inside Promise.all… one fails… 💥 and suddenly everything crashes.

The truth?
Not all Promise methods behave the same — and understanding their differences can save you hours of debugging and weird async bugs.

Here’s the quick rundown I shared in my latest deep-dive article 👇

  • Promise.all → All or nothing. If one fails, everyone fails.

  • Promise.allSettled → Waits for all, even if some fail. Perfect for logging or partial UI updates.

  • Promise.race → First to settle (success or failure) wins. Great for timeouts.

  • Promise.any → First success wins. Perfect for redundant or fallback API calls.

What I found fascinating while writing it is how differently they behave in the event loop — and how easily we misuse them without realizing.
I even added analogies (like race cars 🏎️, delivery partners 🚚, and job offers 💼) to make each concept click instantly.

If you’ve ever asked yourself “Which Promise should I use here?”, this breakdown might be worth a read.
(And yeah — it’s written for everyone from juniors to seasoned devs.)

👉 Promise.all vs allSettled vs race vs any — What Every JavaScript Developer Should Know

Curious to know:
Which one do you use most in your day-to-day code — and have you ever had a bug caused by the wrong choice?


r/JavaScriptTips • • Apr 11 '23

95%+ of the content on this sub is better explained here

Thumbnail
javascript.info
5 Upvotes

r/JavaScriptTips • • Nov 03 '20

22 Javascript String Methods 🔥

Thumbnail
gallery
5 Upvotes

r/JavaScriptTips • • Jul 11 '21

4 Ways To Write For Loops in JavaScript

Thumbnail
medium.com
5 Upvotes

r/JavaScriptTips • • Dec 28 '24

Shiny Border Button Effect | HTML CSS

6 Upvotes

r/JavaScriptTips • • Dec 22 '24

Interactive Submit Button Using HTML CSS and JavaScript

6 Upvotes

r/JavaScriptTips • • Mar 14 '23

What am I doing wrong?

Post image
6 Upvotes

r/JavaScriptTips • • Mar 20 '24

Have you seen Javascript cards? 65 cards that help you learn the most popular programming language.

Post image
6 Upvotes

r/JavaScriptTips • • Sep 22 '24

How to Use ChatGPT for Learning JavaScript

6 Upvotes

In a post on r/learnjavascript, someone asked how to use ChatGPT to learn JavaScript. I decided to explain my approach through an infographic.

You can read the entire article here.

Note: ChatGPT can occasionally give flawed explanations or code. Always double-check the information with trusted sources like official documentation.


r/JavaScriptTips • • Jul 14 '25

Why learning React is no easy task?

Thumbnail reddit.com
0 Upvotes

r/JavaScriptTips • • Feb 17 '26

How to Fetch Data in JavaScript (The Clean Way)

Thumbnail
youtu.be
1 Upvotes

r/JavaScriptTips • • Mar 20 '25

Help with getting my code to work right.

1 Upvotes

Trying to get this “app” (made in code.org unfortunately, it’s for school) to work right but it keeps popping out really small numbers I know can’t be accurate as the final price, even if using the weekly number which would multiply it, making it supposedly larger.


r/JavaScriptTips • • Jan 24 '25

Call for Presentations - Node Congress, April 17-18, 2025

Thumbnail
forms.gle
1 Upvotes

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 • • Nov 14 '24

Python f-Strings: Clean String Formatting Error handling in Python

Thumbnail
instagram.com
0 Upvotes