Web ကို Interactive ဖြစ်အောင် လုပ်နည်း — Variables, Logic, DOM, Events
var, let, const — string, number, boolean, null, undefined, typeof
if/else/else if, switch/case, ternary operator, comparison operators
for, while, do-while, for...of, for...in, break, continue
function declaration, expression, arrow functions, parameters, return
push/pop, map, filter, reduce, find, forEach, spread operator
Object literals, properties, methods, destructuring, spread, JSON
getElementById, querySelector, createElement, innerHTML, classList
addEventListener, event object, bubbling, delegation, common events
class, constructor, methods, static, private fields (#), getters/setters
extends, super(), method overriding, polymorphism, instanceof
Prototype lookup chain, Object.create(), Mixin pattern, hasOwnProperty
Lexical scope, closure, IIFE, memoization, currying, module pattern
Singleton, Factory, Observer, Strategy, Module pattern
Error types, try/catch/finally, custom Error classes, async errors, global handler
let name = "Min"
const PI = 3.14
var old = true
typeof name → "string"
if (x > 5) { ... }
else if (x === 5) { }
else { ... }
x > 5 ? "big" : "small"
for (let i=0; i<5; i++)
while (cond) { ... }
for (const x of arr)
arr.forEach(x => ...)
function add(a, b) {
return a + b
}
const mul = (a,b) => a*b
arr.push(x) / pop()
arr.map(x => x*2)
arr.filter(x => x>3)
arr.find(x => x===5)
const p = { name:"Min" }
p.name / p["name"]
const {name} = p
JSON.stringify(p)
document.getElementById
document.querySelector
el.innerHTML = "text"
el.classList.add("cls")
el.addEventListener(
"click", function(e) {
e.target / e.preventDefault()
})