Web Development · WDC-01-08

Basic JavaScript

Basic JavaScript is a beginner course in modern JavaScript, from variables, conditions, functions, arrays and objects to working with the DOM, handling events, validating forms and fetching data with the Fetch API. It suits complete beginners, people who already write HTML and CSS, and students, and you leave with a small working web app of your own.

Updated
From 4,050 THB / person 4,500 −10% excl. VAT 7% · group rates available
PDFDownload the course outline
  • Duration12 hours · 2 days
  • FormatOnsite / live online
  • Next roundOn request
  • CertificateIncluded

Course overview

JavaScript is the one language every browser understands, so it sits behind almost every button, menu, form and interactive screen on the web, and it is also the foundation of React, Vue, Node.js and many other modern tools. Yet many beginners learn from outdated examples that still rely on var, jQuery or browser features that are no longer recommended, which leads to buggy code and makes it hard to move on to newer tools.

This course starts from zero and teaches JavaScript the way it is written today. Learners set up VS Code and Chrome DevTools, then learn const and let, data types, operators, conditions, loops, functions, arrays and objects. They then apply all of this to real pages through the DOM and events, validate forms, fetch data from APIs with Fetch and async/await, store data with localStorage and split code into files with ES modules. The course closes with a workshop in which each learner builds a small, complete web app of their own. (2 days, 6 hours per day, 12 hours in total, Beginner level.)

What you’ll gain

  • Understand the role of JavaScript on a web page and use DevTools to find errors
  • Use const and let, data types and operators correctly
  • Write conditions, loops and functions to solve problems independently
  • Work confidently with arrays, objects and JSON
  • Select and change page elements through the DOM and respond to user events
  • Validate form input and fetch data from APIs with Fetch and async/await
  • Build a small web app that stores data with localStorage and is organised with ES modules

Who this course is for

  • Beginners with no programming experience who want to start with JavaScript
  • People who already write HTML and CSS and want their pages to respond to users
  • School and university students who need JavaScript for coursework or projects
  • Developers from other languages and IT managers who want a structured view of modern JavaScript
  • Anyone planning to learn React, Vue or Node.js next who wants solid foundations

Prerequisites

  • Able to use a computer, manage files and folders, and use a web browser
  • No previous programming experience is needed
  • Some basic HTML and CSS will make the course easier
  • A laptop that can run VS Code and an up-to-date browser such as Chrome or Edge

Curriculum

Course Details

This course is the 2026 edition of the Basic JavaScript course. It runs for 2 days, 6 hours per day (12 hours in total, 09:00-16:00), as lectures alternating with labs. Beginner level, with no programming experience needed. This edition teaches JavaScript to the current ECMAScript standard, uses const and let instead of var, and drops outdated topics such as JScript, frames, the status bar, rollover effects and jQuery. It uses localStorage instead of cookies and adds the Fetch API, async/await and ES modules. It focuses on the foundations for beginners, unlike Advanced JavaScript, which goes on to classes, closures, the event loop, Node.js and testing. Learners take home a lab guide, starter files and solution code for every lab.

Day 1 JavaScript Language Basics

Section 1: Lab: Getting Started with JavaScript in the Browser

  • What JavaScript does on a web page and how it relates to HTML, CSS and ECMAScript
  • Install VS Code with Live Server and Prettier
  • Add JavaScript to a page with script tags using defer and type module
  • Try code in the DevTools Console and read error messages
  • Lab: a first page that greets the user and shows today's date

Section 2: Variables, Data Types and Operators

  • Declare variables with const and let, and why new code avoids var
  • The number, string, boolean, null and undefined types, and typeof
  • Template literals for putting values into text
  • Arithmetic, comparison with ===, logical operators and ??
  • Lab: a price calculator with discount and VAT

Section 3: Lab: Conditions and Loops

  • if, else if, else and switch
  • The ternary operator and truthy and falsy values
  • for, while and for...of loops
  • Controlling loops with break and continue
  • Workshop: a number-guessing game that says whether a guess is too high or too low

Section 4: Functions and Variable Scope

  • Function declarations and arrow functions
  • Parameters, default values and returning results
  • Block scope and function scope
  • Passing functions as callbacks
  • Lab: reusable functions for grading and unit conversion

Section 5: Arrays, Objects and JSON

  • Create and change arrays with push, pop, includes and indexOf
  • Loop over and transform data with forEach, map, filter, find and reduce
  • Object literals, properties, methods and basic destructuring
  • Convert data between objects and JSON
  • Lab: a shopping cart list with a running total
Day 2 The DOM, Events and a First Web App

Section 6: Lab: Working with the Page Through the DOM

  • What the DOM is and selecting elements with querySelector
  • Change text with textContent and styling with classList
  • Create, add and remove elements with createElement and append
  • The risk of innerHTML with user data, and how to prevent XSS
  • Lab: render a product array as cards on the page

Section 7: Lab: Handling User Events

  • addEventListener with click, input, change and keydown events
  • The event object and preventDefault
  • Event delegation for items added later
  • Making buttons and menus work with the keyboard
  • Lab: a to-do list where items can be added, ticked off and removed

Section 8: Forms and Input Validation

  • Read form values with FormData and the submit event
  • Use built-in HTML validation such as required and pattern
  • Add extra checks in JavaScript and show helpful messages
  • Lab: a sign-up form that checks the data before it is sent

Section 9: Lab: The Fetch API, async/await and Storing Data

  • Asynchronous work and a first look at Promises
  • Fetch JSON from an API with fetch and async/await
  • Handle errors and loading states with try and catch
  • Save and read data with localStorage
  • Split code into several files with ES module import and export

Section 10: Workshop: Your Own List-Management Web App

  • Find bugs with breakpoints in DevTools
  • Use an AI assistant to explain code, and always check the result yourself
  • Workshop: an income and expense tracker that adds, deletes, searches and saves entries
  • Present the work and plan next steps towards Advanced JavaScript, React or Vue

Schedule & training options

For individuals — public rounds

No public rounds are open right now. Join the waiting list and we will contact you first when the next round opens, or ask us on LINE. Or call 02-570-8449 or 088-807-9770

For organisations — in-house / private

  • Tailor the content to your team’s tools and projects
  • Your dates, at your office or live online
  • Quotation with tax ID for procurement
Corporate training quote

Instructors

Frequently asked questions

What is the DOM, and how do you change page content with JavaScript?

The DOM (Document Object Model) is the tree of objects the browser builds from a page, which JavaScript can read and change. Select an element with document.querySelector(), change its text with textContent and its styling through classList, and create new elements with createElement() before adding them to the page with append(). Avoid putting user input straight into innerHTML, to prevent XSS.

What is the difference between var, let and const in JavaScript?

var is the older way to declare variables: it is function-scoped and can be redeclared, which easily causes bugs. let is scoped to the block { } where it is declared and can be reassigned, while const is also block-scoped but cannot be reassigned. Modern code uses const by default and let when a value must change, such as a loop counter, and this course uses const and let throughout.

How do you make a button respond to a click with JavaScript?

Select the button with document.querySelector(), attach a function to its click event with addEventListener('click', handler), and put the actions you want inside that function, such as changing text or showing and hiding a message. For forms, listen for the form's submit event and call event.preventDefault() so you can validate first, and use a real button element so it works with the keyboard.

Who is the Basic JavaScript course for, and what should I know beforehand?

It suits beginners who want to start programming with JavaScript, people who already write HTML and CSS and want interactive pages, students, developers from other languages and IT managers. No previous programming experience is required: you just need to be comfortable with a computer and a web browser. Some HTML and CSS will make it easier.

What will I be able to do after the Basic JavaScript course?

You will be able to write JavaScript with const and let, conditions, loops and functions, work with arrays, objects and JSON, control pages through the DOM and events, validate forms, fetch data from APIs with Fetch and async/await and store data with localStorage, with the workshop web app to show for it, ready to move on to Advanced JavaScript, React or Vue. Participants who complete the training receive a Certificate of Completion with its own number, which can be verified online.

Can the Basic JavaScript course be run in-house for our team?

Yes. It can be run in-house for your team, with examples adapted to your own work, such as adding form checks or data fetching to pages your team already looks after. You can request a quotation from this page, or contact us on LINE @itgenius or by phone on 02-570-8449.

Related articles

Articles are published in Thai.