🏠 Home / Hub

JavaScript Basics

Web ကို Interactive ဖြစ်အောင် လုပ်နည်း — Variables, Logic, DOM, Events

14 Lessons · Vanilla JS · OOP · Design Patterns · Live Examples ပါ
Core Concepts
01
📦

Variables & Data Types

var, let, const — string, number, boolean, null, undefined, typeof

letconsttypeofstring
02
🔀

Conditions

if/else/else if, switch/case, ternary operator, comparison operators

ifelseswitch? :
03
🔁

Loops

for, while, do-while, for...of, for...in, break, continue

forwhilefor...ofbreak
04
🔧

Functions

function declaration, expression, arrow functions, parameters, return

function=>returnparams
Data & DOM
05
📚

Arrays

push/pop, map, filter, reduce, find, forEach, spread operator

pushmapfilterreduce
06
🗂️

Objects

Object literals, properties, methods, destructuring, spread, JSON

{ key:val }dotdestructJSON
07
🖥️

DOM Manipulation

getElementById, querySelector, createElement, innerHTML, classList

getElementByIdquerySelectorinnerHTML
08
🖱️

Events

addEventListener, event object, bubbling, delegation, common events

addEventListenerclicksubmite.target
OOP & Advanced
09
🏗️

OOP: Classes & Objects

class, constructor, methods, static, private fields (#), getters/setters

classnewthis#private
10
🧬

Inheritance & Polymorphism

extends, super(), method overriding, polymorphism, instanceof

extendssuper()overridepolymorphism
11
🔗

Prototype Chain

Prototype lookup chain, Object.create(), Mixin pattern, hasOwnProperty

prototypeObject.createmixin
12
🔒

Closures & Scope

Lexical scope, closure, IIFE, memoization, currying, module pattern

closureIIFEscopecurry
13
🏛️

Design Patterns

Singleton, Factory, Observer, Strategy, Module pattern

SingletonFactoryObserverStrategy
14
⚠️

Error Handling

Error types, try/catch/finally, custom Error classes, async errors, global handler

try/catchErrorthrowasync

📋 JavaScript Quick Reference

Variables

let name = "Min"
const PI = 3.14
var old = true
typeof name → "string"

Conditions

if (x > 5) { ... }
else if (x === 5) { }
else { ... }
x > 5 ? "big" : "small"

Loops

for (let i=0; i<5; i++)
while (cond) { ... }
for (const x of arr)
arr.forEach(x => ...)

Functions

function add(a, b) {
return a + b
}
const mul = (a,b) => a*b

Arrays

arr.push(x) / pop()
arr.map(x => x*2)
arr.filter(x => x>3)
arr.find(x => x===5)

Objects

const p = { name:"Min" }
p.name / p["name"]
const {name} = p
JSON.stringify(p)

DOM

document.getElementById
document.querySelector
el.innerHTML = "text"
el.classList.add("cls")

Events

el.addEventListener(
"click", function(e) {
e.target / e.preventDefault()
})

Other Subjects

🚀 Back to Hub 🌐 HTML 🎨 CSS 🐘 PHP

📌 Study Checklist