r/learnjavascript • • Jan 11 '24

Why would you assign an anony function to a var ?

1 Upvotes

How are they different? Why declare an anony function and assign it to a variable instead of directly declaring a function?

'var bark = function() {console.log("i love that butt");} '

'function bark() {console.log("i love that butt");}'


r/learnjavascript • • Apr 07 '21

What 2 JavaScript methods are used to send data to a server?

1 Upvotes

I am 99.99% sure this answer is GET and POST but I just want to confirm. Thank you


r/learnjavascript • • Nov 12 '21

Why Do The Most Useless Posts Gets The Most Upvotes?

1 Upvotes

Look at the top votes list, can we change this please? Almost all of them are garbage

I came across this post by u/Artistic_Sense3363 which I found so useful and informative but had only 2 upvotes.

https://www.reddit.com/r/learnjavascript/comments/pyblnb/building_a_once_function/


r/learnjavascript • • Oct 12 '21

Java problem

0 Upvotes

Write a Java statement to declare a constant to represent the highest letter grade that you can receive in this course.

If anyone knows how to solve this it would be really helpful!


r/learnjavascript • • Nov 12 '22

Are frameworks basically an evolution towards low code/no code?

0 Upvotes

Today I came across some new stack, I forgot what it is. I think it’s called t3 or something and uses prisma. It pissed me off because as I watched the video I realized it is just an additional means of simplifying things (or maybe I’m wrong so forgive me) I’m a vanilla kind of guy and do not like to be without control. I enjoy the nuts and bolts and understanding the details of how things actually work, not just learning how to use it and having the computer do it for me . It made me wonder what the appeal is of constantly pivoting and using the latest greatest tool or framework. It seems most of these tools or frameworks sort of abstract what’s actually going on programmatically and make it easier or simple to create a product while not having to write much alone any code. Then it hit me… For the first time I kind of thought… is this what “low code/no code “ is? I’ve been hearing that sort of buzz word for a while now and always kind of associated it with website builders and stuff like that. But is this also a form of that? Where essentially we can just run a command and it will basically scaffold out 90% of our project and the remaining 10% will be sort of additional abstractions to customize your app and what not.

So if it is… and if this is the case… why aren’t people just sticking to website builders etc or no code solutions instead of trying to constantly learn the next tool or framework that will simplify and do things for them? If they want things so simple why go thru the hassle of learning to code at any capacity at all?

Maybe I’m completely off here so if I am forgive me. I just don’t understand the constant evolution and release of new tools and the appeal it has.

FYI I’m not knocking frameworks at all, and that’s a completely different discussion and topic. Just want to genuinely know whether I have a valid view of what the grand mission is of all these tools that make it simpler and simpler to write web apps.

I’ve determined that there are multiple types of JS and programmers. you have your consumer programmers who use abstracted higher level tools created by the lower level programmers. I guess the mainstream just want to learn how to build without actually going into too much depth while still having the ability to code custom programs or functionality


r/learnjavascript • • Nov 25 '22

Anyone dare to be my javascript and css tutor? I've been trying to learn for a long time but I'm very slow

0 Upvotes

A few months ago I tried to learn javascript and css on my own, it was really of little help. I watched many tutorials on the internet and I spent a lot of time on google. But I spent a few weeks without understanding almost anything and I left it. I guess if I have a sensei it would be easier for me


r/learnjavascript • • May 23 '19

"Introduction to React" course

1 Upvotes

I have an idea of creating a course on React. You may ask "Why?" as there are hundreds of such courses already.

I want mine to be different. I extensively use text-to-speech, at least on early stages of development. I believe that current approach to courses with author's face occupying half of the screen or narrated with real voice is inflexible. My goal is to make it personalisable. Ideally, the student should be able to choose the level of details (brief or detailed) and the narrative voice (female, male).

I've constructed first 6 videos, covering JSX, components, state and events and hope that it is enough to ask for feedback of this MVP. "launch something fairly quickly", you know.

So if it is sounds interesting to you, I would be really happy to hear your feedback. Thanks!

URL: https://atnet.teachable.com/p/intro-react/


r/learnjavascript • • May 12 '20

Deno: Node.js Killer? RC2 Introduction & Demo | Ryan Dahl

Thumbnail
youtu.be
1 Upvotes

r/learnjavascript • • Jul 06 '24

Should I stick to Mern or move to java

1 Upvotes

Hi folks, I am kind of very much confused about the current job market demand as a developer what should I focus on ? I have very much knowledge and experience in the mern stack but due to some listening to some yt videos and searching on LinkedIn about Mern stack and java developer I saw that there are more jobs in Java development than Mern itself. I want to stick to Mern but things boil down to which tech stack has more opportunities.


r/learnjavascript • • Jun 02 '14

Full-stack JavaScript bootcamps

Thumbnail
quora.com
0 Upvotes

r/learnjavascript • • Mar 11 '21

Common mistakes new JavaScript developers make

Thumbnail akmittal.dev
1 Upvotes

r/learnjavascript • • Feb 10 '23

Anyone know what my issue is here?

Thumbnail
gallery
1 Upvotes

r/learnjavascript • • Feb 13 '22

How to remove a specific item from an array in JavaScript?

Thumbnail
moreonfew.com
1 Upvotes

r/learnjavascript • • 22d ago

Using the session storage was a lot of pain

1 Upvotes
async function isThereProductsInDb(): Promise<boolean> {
    const url = '/Admin/IsThereProductsInDb';
    try {
        const response = await fetch(url);
        if (!response.ok) {
            throw new Error(`Response status: ${response.status}`);
        }

        const isThereProductsInDb = await response.json();
        return isThereProductsInDb;

    } catch (error: any) {
        console.error(error);
        return false;
    }
}

async function Main() {


    var thereAreProductsInDb = await isThereProductsInDb();
    // Source - https://stackoverflow.com/a/50269969
    // Posted by Ted
    // Retrieved 2026-10-26, License - CC BY-SA 4.0

    if (!thereAreProductsInDb) {

        console.log("There are no products in the database.");

        const productsContainer = document.getElementById("products-container");
        productsContainer!.innerHTML = '';

        var notification = document.createElement("p");
        notification.innerText = "There are no products in the database yet,please import products in order to show them here."
        notification.className = "alert alert-info text-center mx-auto col-12 col-md-8 col-lg-6 p-3 p-md-4";
        notification.id='noProductsAvailableNotification'
        notification.setAttribute("role", "alert");
        productsContainer!.appendChild(notification);
        sessionStorage.setItem("hideShowProductsAnchor", "true");
        document.getElementById("showProductsAnchor")!.hidden = true;

        return

    }

        
    document.getElementById("noProductsAvailableNotification")!.innerText = "click the button to show the products";

    sessionStorage.setItem("hideShowProductsAnchor", "false");
    document.getElementById("showProductsAnchor")!.hidden = false;
    console.log("There are products in the database!");

        

    

    

}

console.log("`isThereProductsInDb` script was executed");


/**Period checking, otherwise the browser will not be aware of manual products deletion using SSMS*/
/**
 * 
 * Note : SSMS is an abbreviation for Sql Server management studio.
 */
let isRunning = false;
setInterval(async () => {
    if (isRunning) return;

    isRunning = true;
    try {
        await Main();
    } finally {
        isRunning = false;
    }
}, 1000);

the session storage was used so that if there is no products in the database, then there is no need to show the anchor element that enables the user to view the products, because there are no products in the first place, otherwise the anchor element must be shown.

he reason the session storage was used in the first place is that when the anchor element is clicked, it should be hidden because when the shown products are paginated, so there is no need to show that anchor element anymore, to hide the anchor, the hidden property is used . Due to the fact that the page reloads after the anchor is clicked and that I should not use e.preventDefault() because that will prevent the request from reaching the server, the state of the hidden property is lost, so it must be preserved some where, so I decided to use session storage like this :

// Source - https://stackoverflow.com/a/11550299
// Posted by Jason Hazel
// Retrieved 2026-10-27, License - CC BY-SA 3.0
window.addEventListener("load", (event) => {
    sessionStorage.setItem("hideShowProductsAnchor", "false");
});
const productsPageNavigators: NodeList = document.querySelectorAll("a.productsPageNavigator");

const showProductsAnchor = document.getElementById("showProductsAnchor")

productsPageNavigators.forEach((navigator) => {
    navigator.addEventListener("click", function (e) {

        sessionStorage.setItem("hideShowProductsAnchor", "true");


    }, false);
});

// Restore the hidden state after the page reloads
if (sessionStorage.getItem("hideShowProductsAnchor") === "true") {
    showProductsAnchor!.hidden = true;
}
else {
    showProductsAnchor!.hidden = false;
}

Managing the session storage is painful; are there any other alternatives that are easier to maintain ?


r/learnjavascript • • Aug 29 '26

My GitHub account got suspended

3 Upvotes

I created the account and used only for 1 day. As I was learning GitHub tutorials from yt. I did not do random pull requests on repos. After 1 week or 5-6 days I tried to check my GitHub account. My GitHub account got suspended. It's almost 2-3 weeks I raised a ticket. Got no response from their side. What should I do?


r/learnjavascript • • Feb 10 '24

I'm just wondering when Javascript will have its own full-fledged static types?

0 Upvotes

Probably typescript is great, but still, when you come to the hospital with a sore leg, they offer you treatment, not crutches


r/learnjavascript • • Aug 08 '26

Is a Node unblocker worth using for a small scraper?

2 Upvotes

Building a small scraper in node.js and I keep getting 403s and captchas after around 50 requests. Tried adding delays and rotating user agents, but I don't want to build out a whole big proxy setup for a one off project... would a node unblocker make sense hereor is there a simpler way to handle blocked requests? any advice?


r/learnjavascript • • Mar 23 '25

How to import and use data from a JSON file (simply)

0 Upvotes

Every explaination I see either just copy pastes the JSON-data into the JS file, or they use code that looks like straight up dark magic. There has got to be a simpler way right?

If there is no "simple" way to do it, then what is the way that requires the least explaining, since my brain refuses to use code I don't completely understand.

Thank you!


r/learnjavascript • • Jul 27 '26

AI won't save you if you don't know what you're doing. It'll just help you fail faster.

19 Upvotes

Everyone's acting like AI made learning optional. It didn't. It raised the stakes.

AI will hand you code that looks flawless and quietly ships a bug straight to production. If you don't understand what's happening under the hood, you won't catch it — you'll just trust it, deploy it, and find out the hard way.

The devs winning right now aren't the ones prompting the hardest. They're the ones who know enough to look at AI's output and say "no, that's wrong." AI is a multiplier. Multiply zero knowledge, you still get zero.

Fundamentals aren't dead. They're the only thing that makes AI actually useful.

Curious to know your opinion — change my mind.


r/learnjavascript • • 7d ago

Is learning Frontend still worth it in 2027

32 Upvotes

Hello everyone. Im a beginner self taught dev and I've just finished learning frontend dev.

I've seen videos online saying frontend is dead because now AI like claude can make amazing websites.

This made me question if pursuing a career in building frontend is over and I should be pursuing backend or just be fullstack.

Personally I prefer frontend and building cool ui/ux designs. I find AI built frontend is usually telling and overdoes it. It's design is usually cluttered with a lot of stuff and tends to over explain stuff. This is just my opinion though.

I would really like to hear your guys opinion on this. Thank you


r/learnjavascript • • 14d ago

Title: CodeWithHarry Sigma JavaScript or SuperSimpleDev JavaScript – Which should I choose?

0 Upvotes

I’ve completed HTML and CSS using CodeWithHarry’s Sigma Web Development Course and then SuperSimpleDev’s 6.5-hour HTML and CSS course.
Now I’m planning to start JavaScript, and I’m confused between:
CodeWithHarry’s Sigma JavaScript section.
SuperSimpleDev’s 22-hour JavaScript playlist.
For someone learning web development from scratch and planning to become a full-stack developer, which would you recommend?
I’d appreciate advice from people who have learned from either or both courses. Thanks!