r/JavaScriptTips • • Jan 16 '25

Why am I not returning a resolved Promise when using async/await inside map inside Promise.all?

4 Upvotes

Why is it that Im not returning a anything but a 'pending Promise'? I know .map is synchronous, but thats why Im using Promise.all..

const arr = [1,2,3,4,5,6];
const promise = (num) => {
    return new Promise((resolve, reject) => {
         setTimeout(() => {
            resolve(num)
    }, 2000)
    })
}
const x = async () => {
  return Promise.all(arr.map(async(item) => {
      const num = await promise(item);
      return num*2;
  }))
}
console.log(x())

r/JavaScriptTips • • Jan 10 '25

Change Text with Onclick HTML CSS and JavaScript - Hello World

4 Upvotes

r/JavaScriptTips • • Dec 30 '24

✨ Amazing Card Hover Effects with CSS! 🔥 #css #coding #programming #webdesign

4 Upvotes

r/JavaScriptTips • • Dec 15 '24

Tip to improve programming logic?

4 Upvotes

What do you recommend I do to improve my programming logic? Books ? Any specific website?


r/JavaScriptTips • • Nov 28 '24

Signals and Effects Using Vanilla JavaScript & Web APIs

Thumbnail
medium.com
4 Upvotes

r/JavaScriptTips • • Nov 27 '24

Working with JavaScript's Scheduler API

Thumbnail trevorlasn.com
4 Upvotes

r/JavaScriptTips • • Nov 22 '24

GIVE ME A ADVANCED PROJECT IDEA FOR MERN PROJECT

4 Upvotes
  1. please suggest a MERN project idea .advanced or moderate difficulty

  2. am already did an todo,and e-commerce


r/JavaScriptTips • • Sep 10 '24

What is supposed to go in place of mhs in order to display image?

Post image
4 Upvotes

r/JavaScriptTips • • Sep 05 '24

Must-Know JavaScript Tips: Template Literals, Arrow Functions, Destructuring, and IIFE

Thumbnail
gallery
4 Upvotes

r/JavaScriptTips • • Aug 30 '24

Embrace Intermediate Variables and Early Returns

Thumbnail trevorlasn.com
4 Upvotes

r/JavaScriptTips • • Aug 27 '24

Does anyone know a good crash course for JavaScript and typescript?

Thumbnail reddit.com
4 Upvotes

r/JavaScriptTips • • Aug 11 '24

Where can I practise Javascript? (Like Quiz or Project)

4 Upvotes

I am learning javascript basics. I think I should practise it more and more to learn properly. Could you suggest me any free website or place where I can practise it?

Thanks.


r/JavaScriptTips • • May 29 '24

On learning ‘javascript’ for the first time

4 Upvotes

I am currently considering developing a desktop application using Tauri as my graduation project.

However, I am not learning javascript.

So my question is, what libraries would you recommend for a short production time: Vanilla, Vue, React?

I am a Japanese student and I translate for ‘Deepl’.


r/JavaScriptTips • • May 14 '24

Free Resource for Learning JavaScript with Real Interview Questions

4 Upvotes

Hello Everyone,

I’ve been working on a project to help people dive deeper into JavaScript and prepare for web dev interviews. It’s called CodeClimbJS, and it offers coding exercises based on actual javascript interview exercises. It’s completely free, and I’m passionate about supporting the developer community.
Link: https://codeclimbjs.com/

  • Upcoming Features:

    • React/Visual Feedback Test Cases: Developing a system to create dynamic testing environments for React components.

    • Video Tutorials: Planning to offer tutorials on how I built this web app, it uses NextJS 14 and was mainly created to deep dive into Next new features.

As the project is still in its early stages, I would love to hear your feedback to improve the platform. Your insights will help me refine the test cases and enhance the overall user experience.

Thank you for checking out CodeClimbJS. I hope you find it a valuable tool for your learning journey!

PS: I know how much a lot of devs hate this kind of challenges but they helped me a lot learning sometimes overlooked topics.

Best,
F.


r/JavaScriptTips • • Jan 26 '24

JavaScript Simplified: Quick Reference Guide

4 Upvotes

Introducing my JavaScript Quick Reference Guide.

A comprehensive yet concise quick-reference tool covering the fundamentals of JavaScript.

🔍 Rapid Syntax Lookup: Easily locate and learn common syntax and structure.

💡 Efficient Learning: Streamline JavaScript complexities into core concepts.

🖥️ Consolidated Resource: Navigate through JavaScript fundamentals, all in one place.

🌍 Community-Driven: Collaborate with fellow developers to enhance this guide.

JavaScript, simplified. GitHub Link.


r/JavaScriptTips • • Jan 25 '24

Challenge #20 is now released, take a look!

4 Upvotes

Developers: here's a nice one! Take a close look at the code in this challenge and try to get Grandpa Joe's user record (which includes his secret key).
The code is a little longer this time, so hit the link to view it fully: https://wizer-ctf.com/?id=g54Y36
The writeup for the freshly retired challenge, number 14, is also ready for you to read: https://wizer-ctf.com/writeups/ctf14.html
Enjoy and Code Wizer!


r/JavaScriptTips • • Jan 20 '24

Stop Using NodeJS like this 🚫 Tips and Best Practices 💡

Thumbnail self.node
4 Upvotes

r/JavaScriptTips • • Dec 05 '23

One of the most underrated features of Supabase!

Thumbnail
youtu.be
4 Upvotes

r/JavaScriptTips • • Nov 30 '23

How to Reload the Page In React.js?

Thumbnail
topminisite.com
4 Upvotes

r/JavaScriptTips • • Nov 28 '23

How to Make a Text Scramble Animation with JavaScript

4 Upvotes

r/JavaScriptTips • • Nov 26 '23

Multiple Window 3d Synchronize

Thumbnail
youtu.be
4 Upvotes

r/JavaScriptTips • • Nov 04 '23

PDF to Image conversion with nodejs

4 Upvotes

I need to convert the first page of pdf array buffer to image. If I could extract the imagedata from the pdf, that's also fine. Every library has graphics magic as dependeency. I need to acheive it with any nodejs library. Please give suggestions. Thanks in advance.


r/JavaScriptTips • • Oct 09 '23

Speeding up the JavaScript ecosystem - The barrel file debacle

Thumbnail
marvinh.dev
4 Upvotes

r/JavaScriptTips • • Oct 04 '23

The trick to solve any recursion problem...

Thumbnail
youtube.com
4 Upvotes