1-1 JavaScript First Steps - Learn Web Development - MDN
1-1 JavaScript First Steps - Learn Web Development - MDN
Prerequisites
Before starting this module, you don't need any previous JavaScript knowledge, but you
should have some familiarity with HTML and CSS. You are advised to work through the
following modules before starting on JavaScript:
Getting started with the Web (which includes a really basic JavaScript introduction).
Introduction to HTML.
Introduction to CSS.
Note: If you are working on a computer/tablet/other device where you don't have
the ability to create your own files, you could try out (most of) the code examples
in an online coding program such as JSBin or Glitch .
Guides
https://developer.mozilla.org/en-US/docs/Learn/JavaScript/First_steps 1/3
26/05/2023, 14:45 JavaScript First Steps - Learn web development | MDN
What is JavaScript?
Welcome to the MDN beginner's JavaScript course! In this first article we will look at
JavaScript from a high level, answering questions such as "what is it?", and "what is it
doing?", and making sure you are comfortable with JavaScript's purpose.
A first splash into JavaScript
Now you've learned something about the theory of JavaScript, and what you can do
with it, we are going to give you a crash course on the basic features of JavaScript via a
completely practical tutorial. Here you'll build up a simple "Guess the number" game,
step by step.
What went wrong? Troubleshooting JavaScript
When you built up the "Guess the number" game in the previous article, you may have
found that it didn't work. Never fear — this article aims to save you from tearing your
hair out over such problems by providing you with some simple tips on how to find and
fix errors in JavaScript programs.
Storing the information you need — Variables
After reading the last couple of articles you should now know what JavaScript is, what it
can do for you, how you use it alongside other web technologies, and what its main
features look like from a high level. In this article, we will get down to the real basics,
looking at how to work with the most basic building blocks of JavaScript — Variables.
Basic math in JavaScript — numbers and operators
At this point in the course, we discuss maths in JavaScript — how we can combine
operators and other features to successfully manipulate numbers to do our bidding.
Handling text — strings in JavaScript
Next, we'll turn our attention to strings — this is what pieces of text are called in
programming. In this article, we'll look at all the common things that you really ought to
know about strings when learning JavaScript, such as creating strings, escaping quotes
in strings, and joining them together.
https://developer.mozilla.org/en-US/docs/Learn/JavaScript/First_steps 2/3
26/05/2023, 14:45 JavaScript First Steps - Learn web development | MDN
Assessments
The following assessment will test your understanding of the JavaScript basics covered in
the guides above.
Silly story generator
In this assessment, you'll be tasked with taking some of the knowledge you've picked up
in this module's articles and applying it to creating a fun app that generates random silly
stories. Have fun!
See also
Learn JavaScript
An excellent resource for aspiring web developers — Learn JavaScript in an interactive
environment, with short lessons and interactive tests, guided by automated
assessment. The first 40 lessons are free, and the complete course is available for a
small one-time payment.
This page was last modified on Feb 23, 2023 by MDN contributors.
https://developer.mozilla.org/en-US/docs/Learn/JavaScript/First_steps 3/3