← CodeClarityLab Home
Browse by Category
+ added · updated 7d
✕ Clear A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
async / await in JavaScript ES2017
async functions always return a Promise; await pauses execution inside an async function until a Promise settles — giving asynchronous code the readability of synchronous code without blocking the event loop.
4w ago javascript intermediate
Array.flat() & Array.flatMap() ES2019
Array.flat(depth) flattens nested arrays; Array.flatMap() maps then flattens one level — more efficient than map().flat() and great for expanding items.
2mo ago javascript beginner
Accidental Object Mutation Bugs ES2015
Objects and arrays are passed by reference in JS — mutating a function parameter or array element mutates the original, causing subtle cross-component state bugs.
2mo ago javascript intermediate
Async Error Handling (try/catch + Promise) ES2017
Errors in async functions require try/catch or .catch() — a rejected Promise that's not caught becomes an unhandledRejection that crashes Node or shows a console warning in browsers.
2mo ago javascript intermediate
AbortController — Cancellable Fetch ES2017
AbortController cancels in-flight fetch requests — essential for search-as-you-type, tab switching, and preventing race conditions in PHP API calls.
2mo ago javascript intermediate
AJAX Patterns for PHP Backends ES2017
Patterns for communicating with PHP backends via fetch — JSON APIs, CSRF tokens, error handling, and response parsing.
2mo ago javascript intermediate
Axios — HTTP Client for PHP APIs ES2015
Axios is a promise-based HTTP client with interceptors, automatic JSON parsing, and CSRF token injection — common in Laravel and Symfony frontends.
2mo ago javascript intermediate
Diagram: async/await async/await ES2017
Syntactic sugar over Promises — async functions always return a Promise; await pauses execution until the awaited Promise settles.
2mo ago javascript intermediate
✓ schema.org compliant