ZadanieQuick recap. Inside <script type='module'>: const u = new URL('https://x.test/path?id=42&tag=hello'); log u.searchParams.get('id'). localStorage.setItem('k', JSON.stringify({n: 7})); log JSON.parse(localStorage.getItem('k')).n. Build const qs = new URLSearchParams({a:'1', b:'2'}).toString(); log qs. const copy = structuredClone({x:[1,2]}); log copy.x.length.
Recap: Tooling, types, browser APIs (C7-C9)
50 XP5 min
Teoria
Quick recap — Modules C7-C9
The platform APIs you reach for daily. The 4 things every browser app needs:
- `localStorage.setItem` + `getItem` — persist tiny state across reloads. Stringify, JSON.parse on read.
- `new URL(href)` — parse a URL safely. Read
.searchParams.get(key)instead of regex. - `URLSearchParams` — build query strings without manual encoding bugs.
- `structuredClone(x)` — deep copy that handles dates, maps, sets. No more JSON.parse(JSON.stringify).
If any feels random, redo C9-02 / C9-04 / C9-07 / C9-09 then come back.
🔒
Zarejestruj się, aby zacząć kodować
Teoria jest dostępna dla każdego. Edytor, podgląd na żywo i check odblokowują się z 7-dniowym darmowym okresem próbnym — wymagana karta, anuluj w dowolnym momencie.
Zarejestruj się — darmowy okres próbny →Pierwsze 10 lekcji w każdej ścieżce jest darmowych. Karta nie jest wymagana.