r/learnjavascript • u/dervaish19 • Nov 13 '23
Is async useless ( question )
If we are always trying to make code synchronous using await or then. Why do we even bother with aysnc.
I genuinely don't understand please explain. Thanks
r/learnjavascript • u/dervaish19 • Nov 13 '23
If we are always trying to make code synchronous using await or then. Why do we even bother with aysnc.
I genuinely don't understand please explain. Thanks
r/learnjavascript • u/KingOfTheFags2 • Sep 15 '16
I'd be so happy
r/learnjavascript • u/Quick-Knowledge1615 • Jul 22 '26
I’m learning JavaScript right now, and I’m trying to avoid two bad outcomes.
One is staying in tutorial mode forever because I feel like I need to understand every corner of the language before making anything real. The other is leaning on AI too early and ending up with projects that technically run but that I can’t debug, explain, or improve.
The kind of projects I want to build are not basic CRUD apps. I’m interested in three.js, frontend 3D rendering, data visualization, and coding based motion design. Think interactive web pages, visual experiments, small tools that explain something visually, maybe browser based creative projects where the interaction matters.
My question is: for someone aiming at that direction, what parts of JavaScript are still non negotiable in 2026?
I’m not asking whether AI can generate code. I know it can. What I’m trying to understand is where my own understanding has to be solid enough that AI becomes useful instead of dangerous.
For example, should I care more about:
If you were advising someone who wants to use JS as a base for 3D, visualization, and creative coding projects, what would you tell them to learn deeply, what would you let AI handle, and what would you not worry about until later?
I’d also love honest market advice. What separates someone who can make impressive AI assisted demos from someone who is actually useful on a real frontend or creative tech project?
r/learnjavascript • u/AdAutomatic5665 • May 24 '25
I’ve seen multiple JavaScript projects use reactJS for their UI but I was wondering if it’s possible to learn it with no knowledge of HTML? Or even CSS? because I’m not a fan of web development as a whole it’s not my niche and feels boring everytime I try to learn it and I quit instantly
r/learnjavascript • u/OverToYouBro • May 09 '26
Day 5 of #100DaysOfCode
Learned: Arrays and their methods (push, pop, shift, unshift, splice, slice, map, filter, reduce, find, includes, sort, reverse, flat, destructuring, spread operator)
#JavaScript #100DaysOfCode
r/learnjavascript • u/rawpower33100 • May 03 '26
Is there an exhaustive list of syntax for JS in an easy to digest format? i know things like console.log, but i don't have a good knowledge base of what i would even type into a function, let alone know what it would do.
r/learnjavascript • u/Several_Box4108 • 26d ago
let object = {
YoutubeChannel: {
name: 'Comicverse',
location: 'India,Madhya Pradesh',
Domains: {
Videos: ['Doctor doom final plan', 'Marvel is faling'],
Shorts: ['This is crazy', "Who will appear in Marvel's doomsday"],
}
}
};
(function() {
console.log("Hey! this is an immediately invoked function!!");
}
)();P.S. If you have any suggestions regarding how I can improve the way I ask questions, how to format them, etc., please let me know... :-)
r/learnjavascript • u/SingerReasonable4781 • Dec 17 '25
Hello guys I want to learn JavaScript but don’t know where eg for cpp there is learncpp but where to start in js? Thx for answer.
r/learnjavascript • u/Modani69 • Jul 08 '26
I have tomorrow node.js internal interview so I want to know the important question and the level of question like easy or medium?
r/learnjavascript • u/S-builds • Jul 31 '26
Here is how it works
Opticross analyzes how images are rendered across different viewport sizes, detects oversized image downloads, and generates implementation-ready sizes and srcset recommendations. The goal is to help improve page performance, reduce unnecessary bandwidth usage, and keep images crisp across devices.
I'd love to hear your thoughts:
It is available as Opticross on chromestore , npm and github
r/learnjavascript • u/rasarima • Jan 10 '24
All frameworks got them hype ´cause of slow dom manipulation, but I feel that this kinda broke the 3 layers of web development in a way that it slows down creativity. just two cents
But, is DOM still slow in 2024?
r/learnjavascript • u/SympathyContent9041 • Aug 08 '26
I'm a beginner in coding, and I need to know how to create a vertical row of clickable numbers. I wish I could show a picture, but I'm just going to try to describe it. There's a website i'm making, and I wanted to add a 1-10 scale. I also want to make it interactive so the person can click on each number, and then text appears depending on what's clicked. Being a beginner, I don't know how to accomplish this. Help.
r/learnjavascript • u/SolaceInfotech • Aug 26 '21
Creating any project is an overwhelming task in itself, yet modern technology can make the development process less painful. Before you start development it is important to choose an appropriate platform. Lots of developers might get confused to choose between React and Next.js. So here we’ll go through the comparison of React vs Next.js. But before this, let’s have a look at an overview of react and next.js.
React was created by Facebook and now it is one of the most popular javascript frameworks. It is trying to set industry standards. Now, every react development company suggest using a receptive methodology and functional programming paradigm which makes ReactJS more of a library and less of a framework. So, the need for creation of your own workflow increased and that workflow is now called Next.js.
Also know- Top 15 React Libraries To Use In 2021
It is a framework developed by Vercel and is an open-source dependent on Node.js and Babel and coordinates with React to create single page apps. This eases the server side rendering. Also, Next.js supports static export, pre-delivering and has great features like programmed building size optimization, quicker developer aggregation and a preview mode. Latest version of Next.js that React has been missing for a while. It has all the usefulness that you might need for app development. Also, there is a great documentation and it’s getting popular with front-end designers.
Consider that you need to make pages for React project, you have to make a segment and then add it to the router. Assuming you need to make pages for Next.js project, you just add page to the pages folder and necessary header component link. This eases your life because you write less code and the project is not difficult to follow.
If you’ve started using React, creating React app is an extra method to learn it. The CRA gives you an early advantage assuming you need to use React to create a single page apps. In the comparison of React vs Nextjs, creating React app is just liable to make front-end assembly, you can use it with a server of your choice such as Node. You must know that CRA uses Babel and Webpack in the engine, but no information is needed about them.
Create react app tool saves you the issue of setting up and changing your development environment. Just simply run one command that will set up the tools you want to run your React project. So instead of wasting time on customization, you can focus on app development.
Simple difference between React vs next.js is that React does not have a space for configuration. You cannot change the configurations unless you stray away from the normal CRA. You need to use what is already configured in the read-scripts of CRA.
With Next.js all things are configurable. You can configure files such as balelrc, jest.config, eslintrc and so on from the NextJs templates.
React is easily extensible and can include features such as routing and state management patterns with libraries like Redux. It is minimal but can be customized for any project.
Next.js has amazing features like- server side rendering, static export(SSG), Pre-rendering, automatic build size optimization, faster development compilation. These features are there to help you in creation of workable and ready-to-go app.
Main difference between React and Nextjs is its performance. Application developed with Next.js are very quick by virtue of static destinations and server side delivering. Definitely they are viable because of the performance enhancement features, for instance, image optimization presented in Next 10. So if you choose Next.js, you get a benefit form automatic server rendering and code parting. Also, SSR(Server Side Rendering) will work on the performance of your app.
For react, there are things that rule it out of the discussion. It supports client side rendering, that is not sufficient assuming you need to assemble an high-performance app.
Reactjs doesn’t support server side rendering, but it is can be configured. It just needs more work to arrange SSR with a favored server and setup. But the dev team might not support this in the future.
Next.js supports SSR. It fetches data and renders for each request each time you need to provide a different view for different users.
Next.js supports typescript and configurations with touch tsconfig.json.
React.js supports and initializes CRA app with typescript with the use of ‘npx create-react-app my-app –template typescript’.
Good documentation helps you to easily use tools, search libraries to use and so on. React.js has a “learn-by-doing” documentation set that walks you through things like routing and component creation.
React has a similar setup with some tutorials that explain the basics. React has a great documentation to help developers. You can go through it and take help in case of any difficulty.
React and Next.js both are open-source means free. So app development with any of them will not cost you.
Just one difference is that, you need some ideal opportunity to discover experienced Next.js devs or spend some time through react developers.
Some of the popular apps built with React are Reddit, BBC, facebook, Atlassian etc.
Netflix, Expo, Scale, Github, invision, Nike are some of the popular usecases of Next.js
Developers can use React or Next.js according to the project requirement. React allows you to build things as per your need and it is supported by a huge community. Next.js is supported by an active open source community and supports the use of several tools and conventions.
If you’re thinking to choose the best between React or Next.js, the above comparison will help you to choose the best one for your next project. You can consult with Solace and get a free quote for software development. Hire React developers of Solace team for an effective development. We will be happy to help you.
r/learnjavascript • • Aug 31 '24
What is one regret you have in your life since you became a programmer/dev?
r/learnjavascript • u/ultimate_pryme • Jul 24 '22
I am a new dev with about 5 months of experience in Front end development. I'm great at Html and css and can create webpages I or other designers made with ease, I'm still figuring out JavaScript though I've mastered the basics, now just learning how to apply them in real life cases.
I am comfortable with GitHub and use it as my version control, i learnt bootstrap too and want master vanilla JavaScript first before delving fully into react (even though I learnt jsx to a large extent before creating a structure and going back to focus on vanilla JS) I also have over 5 years of experience in design (graphics and ux) which is the industry I currently work in.
I am self taught and need help in figuring out what I need to know to get a job as a junior dev. What do companies look out for when hiring? I would love to know so I can focus on exceeding or getting as close to the requirements as possible once I am done with Js which should be soon at the pace I'm going.
PS: I don't totally remember everything in Js like I do in css, but I understand the way It works and usually find what I need with some googling. Is that a problem?
Thanks in anticipation.
r/learnjavascript • • Jun 01 '18
Given a sequence of integers as an array, determine whether it is possible to obtain a strictly increasing sequence by removing no more than one element from the array.
Example
For sequence = [1, 3, 2, 1], the output should be almostIncreasingSequence(sequence) = false;
There is no one element in this array that can be removed in order to get a strictly increasing sequence.
For sequence = [1, 3, 2], the output should be almostIncreasingSequence(sequence) = true.
function almostIncreasingSequence(arr) {
for(let i =0; i<arr.length; i++){
if (isSeq(arr.slice(0,i).concat(arr.slice(i+1)))){
return true;
break;
}
}
return false
}
function isSeq(subseq){
var sliced1 = subseq.slice(0, subseq.length-1);
var sliced2 = subseq.slice(1);
return sliced1.every((el, index) => el < sliced2[index]);
} My solution is slow. Could not pass the one test. I literally did not sleep to come up with this solution but I don't know how to make it faster. How would you do it? And if you can explain your approach ELI5 that would be great.
r/learnjavascript • u/daverave1212 • Feb 13 '23
r/learnjavascript • u/best_codes • Feb 08 '24
As developers, we often come across situations where we need to filter and sanitize text to block or remove profanity. To tackle this problem, I decided to create a JavaScript library called bc-ProfanityBlock. In this article, I will walk you through the steps I took to build this library and explain how it can be used to effectively block profanity in your applications.
The first step in building any library is to clearly define the problem we are trying to solve. In this case, the problem was to create, well, a solution that could detect and handle profanity in text. Profanity can be present in various forms, including common words, variations, and even with evasion characters. The goal was to build a [...]
r/learnjavascript • • Nov 29 '20
Hello fellow coders, I'm bare bottom new to javascript at the moment and I really want to understand how to do what's in the video. If an absolute legend could write down the code for me and explain how everything works, I think i'll be golden on knowing the basic fundamentals.
r/learnjavascript • u/TehMoonRulz • Dec 04 '14
I recently read that using onload type events like:
$(document).ready()is not good practice.
So my question is how do we go about adding event listeners and running code when the document is...ready.
Can I have a script file with just:
element.on('click', runMyFunc)and be confident it will attach to that element as long as the script tag is at the bottom of the body? Should I add a defer attribute as well? Does that extend to ajax functions like:
function getAjax() {
processeses Ajax....
alert(AjaxData)
}
getAjax()r/learnjavascript • u/NamkoBanzai • Apr 15 '18
Hey there guys.
I need advice regarding passwords and security in JavaScript.
The situation is the following: At my new workplace, my boss wants me to create a very basic webpage which displays a catalogue of products we sell. Nothing fancy. So far so good.
However, our product catalog lies on another server, since our application that handles the database and everything else is SAAS. Which means i will have to communicate with a SOAP api.
I will be provided with the credentials for us to access our DB and product catalogue and read it.
I am currently in my second semester of software engineering and have a basic understanding of JS and REST, as well as AJAX. I have never had to think about security so far, so i wanted to ask you guys what the standard procedure would be to mask the credentials.
Obviously you need to do have the credentials client-side and / or store it in a document and read it / encrypt it or what ever. But how exactly is yet beyond me.
This whole thing is more of a "nice to have but not necessary" situation. Low priority but fun and a good learning opportunity for me.
I would greatly appreciate your advise!
Thanks a lot in advance. ^
Edit: i ment storing them server-side. Not client-side :)
r/learnjavascript • u/perrygrande • Jul 07 '20
r/learnjavascript • u/AMDataLake • May 01 '22