How to store data in the browser using JavaScript localStorage
Code The Web
by Ethan
3y ago
Normally, when you set a variable, it goes away once you reload the page. What if you could store data that stays every time you load the page? That’s what localStorage is! Learn how to use it in this article. Before we begin… I highly recommend following along in this article! It’ll help you understand and remember the concepts better. To get started, create this HTML file and then open it up in your browser: <html> <head> <title>JavaScript LocalStorage</title> </head> <body> <script> // Exciting code coming soon! </script> </body> < ..read more
Visit website
JavaScript Dialogs
Code The Web
by Ethan
3y ago
JavaScript dialog boxes provide an easy way to receive inputs from visitors and output results for them to see. We can use these functions to make all sorts of things!! Before we begin… I highly recommend following along in this article! It’ll help you understand and remember the concepts better. To get started, create this HTML file and then open it up in your browser: <html> <head> <title>JavaScript Dialogs</title> </head> <body> <script> // Exciting code coming soon! </script> </body> </html> If you want to try out some JavaS ..read more
Visit website
JavaScript Timeouts and Intervals
Code The Web
by Ethan
3y ago
Timeouts and intervals let you execute pieces of code at specific times — they’re really useful! Learn how to use them in this article. Before we begin… I highly recommend following along in this article! It’ll help you understand and remember the concepts better. To get started, create this HTML file and then open it up in your browser: <html> <head> <title>JavaScript — Timeouts and Intervals</title> </head> <body> <script> // Exciting code coming soon! </script> </body> </html> If you want to try out some JavaScript, you can p ..read more
Visit website
Dates and times in JavaScript
Code The Web
by Ethan
3y ago
If you’re a developer, you’re bound to use JavaScript dates and times sooner or later! Learn all about them in this article… Getting started I highly recommend following along in this article! It’ll help you understand and remember the concepts better. To get started, create this HTML file and then open it up in your browser: <html> <head> <title>Dates and times in JavaScript</title> </head> <body> <script> // Exciting code coming soon! </script> </body> </html> If you want to try out some JavaScript, you can put it in the <scr ..read more
Visit website
How to interpret URLs with JavaScript
Code The Web
by Ethan
3y ago
There are many situations in web development where you really need to parse (interpret) a URL. Learn how to do that with URL objects in this article! Getting started Create an HTML file with the following code, then open it up in your browser: <html> <head> <title>JavaScript URL parsing</title> </head> <body> <script> // Exciting code coming soon! </script> </body> </html> If you want to try out anything in this article, you can put it in the <script> tag, save, reload the page and see what happens! In this tutorial, I’ll be ..read more
Visit website
How to change HTML and CSS with JavaScript — an introduction to the DOM
Code The Web
by Ethan
3y ago
Part of the entire reason that JavaScript exists is to interact with HTML and CSS. Learn how all three web languages intersect in this article! Getting started Create an HTML file with the following code, then open it up in your browser: <html> <head> <title>The DOM :D</title> </head> <body> <h1>An h1</h1> <p id="myId">I'm a paragraph, look at me!</p> <h1 class="title second-h1" id="classesExample">Another h1</h1> <h1>A third h1</h1> <img src="https://codetheweb.blog/assets/img/posts/javascript-dom/llama.j ..read more
Visit website
JavaScript Objects
Code The Web
by Ethan
3y ago
Objects are ways of storing data in JavaScript and are a key part of Object Oriented Programming. Learn the syntax and more about them in this article… While it’s not completely necessary, a basic understanding of JavaScript arrays may help you understand objects. What is an object? An object in JavaScript is quite similar to an array — it is a data type which stores lots of values. These values can be any data type — numbers, strings, booleans, functions, and even arrays and objects! The difference between an array and an object is how the values are referenced. In an array, you reference ..read more
Visit website
The complete guide to JavaScript arrays
Code The Web
by Ethan
3y ago
Arrays are a very useful part of JavaScript, and come in handy for things from text manipulation to image processing! Whether you’re a complete beginner or coming for some more advanced array functions, this article is for you! The contents of this article: First of all, sorry for another clickbait-y title. However, I promise that this is a complete guide! In fact, so complete that it needs a table of contents! I never thought I’d have to do this, but here we go… What is an array? How to reference a value in an array Array functions string.split() array.join() array.reverse() array.indexOf ..read more
Visit website
The complete guide to JavaScript functions
Code The Web
by Ethan
3y ago
Functions are one of the most useful features of JavaScript. Learn about function inputs, outputs, variable scopes and more in this article! Getting started! First of all, I encourage you to follow along in this article. It will help you learn better, and also help you to remember what you have done. Let’s start by making a new HTML file with a <script> tag in it: <!DOCTYPE html> <html> <head> <title>JavaScript Functions</title> </head> <body> <h1>JavaScript :)</h1> <script> // Our script will go here! </script> </bod ..read more
Visit website
For loops and while loops in JavaScript
Code The Web
by Ethan
3y ago
Loops let you run code as many times as you want! They are really powerful, and a great thing to know. Learn them once and for all in this article from Code The Web! Getting started! Welcome to another post on Code The Web! First of all, I want to encourage you to follow along in this article. It will help you learn better, and also help you to remember what you have done. Let’s start by making a new HTML file with a <script> tag in it: <!DOCTYPE html> <html> <head> <title>For and while loops in JavaScript</title> </head> <body> <h1>JavaS ..read more
Visit website

Follow Code The Web on FeedSpot

Continue with Google
Continue with Apple
OR