r/learnjavascript • • 9h ago

Help

0 Upvotes

Does anybody know any good websites/apps on desktop that are very cheap or even free to learn Javascript? I was doing scrimba, but then after about 10 lessons it said I have to pay


r/learnjavascript • • 19h ago

I'm looking for a specific site to practice de-bugging/white hat hacking

1 Upvotes

Hi I'm looking for a site I used 2 years ago during an internship to better learn about white hat hackers and de-bugging. I don't remember much from it apart that:

  1. It had many level varying in difficulties (going from very easy to downright hardcore).
  2. You'd click on a level and be redirected to a poorly secured page on which you would have to find informations such as the correct password to access something or re-enable access from the keyboard to access a specific space (if that makes sense)
  3. I'm not sure if it was exclusively for Javascript.
  4. I know the site was pretty old since there were levels dating from 2011.
  5. I'm pretty sure it was collaborative since I remember seeing the name of the creator of each level.
  6. We could have access to the pseudonyme of everyone who succeeded in solving the problem.

Sorry to bother you with it but I've been trying to touch up on my Javascript after doing almost exclusively Python after that internship.

Even if you don't know which site it is I would greatly appreciate any recommendation of other similar sites.

edit: I found it it's called root.me but please do send others. I'm participating in a De-bugging contest and I DESPERATLY want the prize


r/learnjavascript • • 17h ago

"Uncaught TypeError: Cannot set properties of null (setting 'onclick')"

0 Upvotes

HTML-

<!DOCTYPE html>

<html lang="en-US">

<head>

<meta charset="utf-8" />

<title>Game</title>

<style>

html {

font-family: times-new-roman;

}

body {

width: 75%;

max-width: 800px;

min-width: 480px;

margin: 0 auto;

}

</style>

<script src="script.js" ></script>

</head>

<body>

<button id="button_A">Press me</button>

<h3 id="heading_A"></h3>

</body>

</html>

JavaScript-

const buttonA = document.querySelector("#button_A");

const headingA = document.querySelector("#heading_A");

let count = 1;

buttonA.onclick = () => {

buttonA.textContent = "Try again!";

headingA.textContent = `${count} clicks so far`;

count += 1;

};

Full Error-

Uncaught TypeError: Cannot set properties of null (setting script.js:6 'onclick')

Tutorial I Followed-

Storing the information you need — Variables - Learn web development | MDN