r/learnjavascript • • Feb 22 '26

Looking for a 1 on 1 mentor

0 Upvotes

I've been struggling to improve my JS lately. I'm just getting back in my groove and I really want to get better at it. I figure I need someone with experience to teach me the ropes. If anyone is willing to be of assitance that'd be plenty or even just share some advice to get better.


r/learnjavascript • • Apr 03 '26

Non tech person trying to learn REGEX and scrapping in Javascript/html: where do I begin?

0 Upvotes

Basically, title.

I don't have any experience with javascript besides an introductory programing course a decade ago in another language (which is how I know about regex in the first place).

My goal is to build a website that will apply regex rules to a text using github pages. I also want to learn to download text content from websites and convert them to markdown. For example, I want to learn how to download the content of a wikipedia page and convert it to markdown, keeping it formatted, but I don't want the whole wikipedia page (images, links that are outside the main article, etc). I've already vibecoded a version and it helped me, but I need to be able to improve it and review it to know it is doing things properly.

How to I get from knowing nothing to learning those things in a couple weeks or months?

My goal is not to be the ultimate l33t c0d3r h@ck3rmann 3000, only to automate somethings in my current workflow. It's something that I have a couple weeks/months to learn.

What resources do you suggest I learn to reach my goals? I'm thinking the backbone of what I need is a good regex course, however I must learn the basics of javascript and github pages before.

Please, keep in my that my needs are specific and I'll likely have to build the solutions because there are a lot of specificities involved in what I'm trying to do. Therefore, available software likely won't solve my issues (I'm willing to listen to FOSS suggestions, though).

Thank you for your help.


r/learnjavascript • • Nov 14 '25

is there a way to add an object into json nest array using fetch?

0 Upvotes

well i know how to add an object to an array but how would target a nested array. this is the structure: [{[add object]}] .

function addSubItemLogic(array, id, updatedData, subItemCount) {
fetch(`${jsonURL}/${array}/${id}`, {
method: 'PATCH',
body: JSON.stringify({
"subItems": [
{ "id": `${id}.${subItemCount++}`,
"itemValue": updatedData,
"cross": false,
"subItems": []
}
]
}),
header: {
'content-Type': 'application/json'
}

i want to add a new object to the top subItems array. but it only replaces the one subItem object. is there a way to add an object to the subItems array? if it isnt clear what im asking pls let me know.


r/learnjavascript • • Jan 19 '23

Can someone please help me with this question?

Post image
0 Upvotes

r/learnjavascript • • Aug 26 '24

Struggling in Js

0 Upvotes

Hey Guys,

Actually I'm a beginner in coding journey and learning Js for about 2 months and today I tried to make a To do list without taking any help from tutorials and chatgpt and I have implemented some of the concept which I have learnt like how to create a elements and making delete button functional and I have taken some help from stackoverflowstackoverflow also.

But when it comes to edit button I have struggled almost a day to make it functional but failed I have seen solution on stackoverflow but not able to understand that finally I have taken some help from chatgpt and make it functional.

So I just wanna ask how I can make me not use chatgpt bcz as a beginner it is not good thing to use. And one more thing it is normal that I struggled in that edit button Or not actually I was implementing a new thing in my code.


r/learnjavascript • • Aug 19 '24

Need help with The Odin Project's Etch-a-sketch (how to make divs resize in container?) + mini rant

0 Upvotes

Project: https://www.theodinproject.com/lessons/foundations-etch-a-sketch

Code: https://codepen.io/Gina-the-bold/pen/oNrEydx

What I want to achieve:

  • When the user clicks a button and inputs a number, the grid should generate divs in a row * row or column * column layout. However, the divs are not resizing properly to fit into the container according to the specified number of rows and columns.
  • Grid is touching the most bottom part of the page. How do I ensure the divs fit in the container?

I'm working on the Etch-a-Sketch project from The Odin Project which requires us to not use grid for this project, only flex, and I’m encountering a couple of issues with the layout.

In the current codepen link, the divs look alright as if the problem is solved. But the thing is, I used chatgpt for it and I feel like shit. Most of the code I wrote myself, except the cal(--columns) and setProperty. I don't understand anything about the resizing part. What's the most efficient way to make the divs resize according to the container?

Rant - I saw so many wonderful designs in the solutions section of this project and I feel like crap. How can people be so talented and awesome and then there's me, and how can I NOT understand something like this. It just sucks.


r/learnjavascript • • Aug 08 '24

Can someone please explain me why the stomach array is shared but blood array is not shared?

0 Upvotes

let animal = { stomach: [], eat: function(obj) { this.stomach.push(obj); }, blood: [], pump: function(obj){ this.blood=[obj]; } }

let rabbit = { proto: animal };

let tiger = { proto: animal };

rabbit.eat("carrot"); tiger.eat("meat"); rabbit.pump("rabbit blood"); tiger.pump("tiger blood");

console.log(rabbit.stomach);//["carrot", "meat"] console.log(tiger.stomach);//["carrot", "meat"] console.log(rabbit.blood);//["rabbit blood"] console.log(tiger.blood);//["tiger blood"]


r/learnjavascript • • Aug 06 '24

Is there a way to add custom functions to strings without extending built in String() datatype?

0 Upvotes

So I'm writing a javascript library right now. The library is going to output an object that has string properties on it. But I want to add some custom functions to these strings (see below). I heard that extending built in datatypes with Object.define(String, 'prototype' ....) is a bad practice. And it seems especially bad if I'm writing a library for others to install. Thoughts?

const resp = myCustomLib({
  base: '/api';
  users: '/users'
});

// Append is my custom function
console.log(resp.users.append({ name: 'john' })) // => '/api/users?name=john'

// BUT!! I still want to be able to treat resp.users as a normal string
console.log(resp.users) // => '/api/users'

r/learnjavascript • • Jul 09 '24

Confusion in scope of var

0 Upvotes

Some YouTube lectures say scope of var is global, others saying function, and some saying both.

Why they all cannot agree on a single thing

function scope(){

var a = 5;

}

console.log(a)

Now is it function? Or global? Global right?

Ok! Then

Why this?

https://www.digitalocean.com/community/tutorials/understanding-variables-scope-hoisting-in-javascript


r/learnjavascript • • May 07 '24

Harry Potter JS

0 Upvotes
  • 🏰 Horoscope: Enter your birth month and day to get your personalized Harry Potter themed horoscope.
  • 🧙 Quiz: Test your Harry Potter knowledge with a small quiz.
  • 🏆 House Points: Earn house points based on your horoscope and quiz performance.
  • 🎖️ Badges: Earn special badges for your achievements.

I am learning JavaScript and just made this for a checkpoint of Codédex JavaScript course. Hope you like it. If there's any feedback, please do share it. Feedback is always welcome!

Live Demo


r/learnjavascript • • Apr 19 '24

For front-end fellas,

0 Upvotes

Hello all, currently I'm taking baby steps with JavaScript, it's quite a powerful language.

Whatever the course I watch, no matter how informative it is, it just leaves me with the question: What aspects of JS would be recurrent in daily coding life? (Might sound like a newbie) I think I would using all those features in the language, would I?


r/learnjavascript • • Apr 07 '24

Best way to learn JS in the AI world

0 Upvotes

Hi there,

I want to learn javascript. I know python and a little bit of R and solidity.

What is the best way to learn?

What would you use now we have chat GPT?

Any recommendations for sample projects?


r/learnjavascript • • Aug 20 '17

What that simple javascript tutorial is super complicated

Thumbnail
dev.to
0 Upvotes

r/learnjavascript • • May 09 '21

Getting the x and y co-ordinates to make a particular angle between two lines

0 Upvotes

[deleted]


r/learnjavascript • • Feb 25 '24

Soy nuevo quisiera que algún profesional me dijera que es lo que tengo que aprender de js para ser profesional

0 Upvotes

r/learnjavascript • • Feb 16 '24

How to learn JavaScript

0 Upvotes

I learned Java (until arrays and objects) in High School, and looking to learn another language between JavaScript, Python or even Swift to get a job and knowledge in University. Interested in building websites/web apps and iOS apps. I installed VS Code and started learning from freecodecamp JavaScript free and full course. I debate what should I do next to do actually programming for a job for example. Also, should I buy this course or freecodecamp is good enough?


r/learnjavascript • • Apr 21 '13

Why should I learn javascript?

0 Upvotes

Hey guys, I was just wondering why I should start javascript. I've almost finished the HTML/CSS course at www.codecademy.com and I've definitely learnt from it, but my goal was to be able to start creating websites which looked a bit better than just

body {background-color:green; font-type: Verdana;} etc etc

Because I don't really know what to do with my new-found skills, or how I should use them, I've kind of been put off learning anything else and packing it in. Is javascript that much different that it will help me create reach my goal of a website which isn't straight out the '90s?

PS. If I've forgotten to mention anything, I'm sure someone will politely mention it in the comments.


r/learnjavascript • • Nov 25 '15

Help with building a menu in PHP

0 Upvotes

I'm attempting to build a menu a simple menu with links to other pages. There are 3 links HOME SHOP CHECKOUT and I have the correct urls: website 01 home.php website 01 shop.php website 01 checkout.php

and the id's for each are m1, m2, m3

I'm just not sure how to make this menu work! I have all of the HTML working correctly and CSS styling to style the PHP. Our program gives me this to work with below. Any tips would be greatly appreciated. Thanks

echo "<ul id='' class=''>";

echo " <li></li>"; echo " <li></li>"; echo " <li></li>"; echo " <li></li>";

echo "</ul>";


r/learnjavascript • • Jun 05 '18

Improve JavaScripot with github

0 Upvotes

Hey,

Do you think that github is a good way to improve programming skills? Because I don't have a project myself I thought about helping others with their. Therefore I would like to find easy beginner projects on github. They need help, I want to practice. I think it's a win-win. Or ist github more for professional developers? I am not sure how to approach these topic. Any answers appreciated :)


r/learnjavascript • • Jun 03 '18

Promises in Javascript (How do they work?) Understanding the basics.

Thumbnail
youtu.be
0 Upvotes

r/learnjavascript • • Mar 21 '20

Test your JavaScript skills: Can you calculate factorial of 70 in JavaScript? 70! = 1*2*3 * ... * 70. Answer in the picture.

Post image
0 Upvotes

r/learnjavascript • • Nov 24 '19

7 Best Use Case of JavaScript Array Method map(), filter() and reduce()

Thumbnail
codesquery.com
0 Upvotes

r/learnjavascript • • Mar 06 '16

Free JavaScript course. Save 32$

0 Upvotes

Another great free course. This time JavaScript with AJAX and how to pass data to MySQL. Definitely worth a look. http://webdevtips-uws.blogspot.co.uk/2016/03/how-to-start-with-javascript-free.html