| name | asynchronous |
| description | Master asynchronous JavaScript patterns including callbacks, promises, async/await, event loop mechanics, and real-world async patterns. |
| sasmp_version | 1.3.0 |
| bonded_agent | 04-asynchronous-javascript |
| bond_type | PRIMARY_BOND |
| skill_type | reference |
| response_format | code_first |
| max_tokens | 1500 |
| parameter_validation | {"required":["topic"],"optional":["pattern_type"]} |
| retry_logic | {"on_ambiguity":"ask_clarification","fallback":"show_async_await_first"} |
| observability | {"entry_log":"Async skill activated","exit_log":"Async reference provided"} |
Asynchronous JavaScript Skill
Quick Reference Card
Event Loop Order
1. Call Stack (sync code)
2. Microtasks (Promise.then, queueMicrotask)
3. Macrotasks (setTimeout, setInterval, I/O)
console.log('1');
setTimeout(() => console.log('2'), 0);
Promise.resolve().then(() => console.log('3'));
console.log('4');
Promise Basics
const promise = new Promise((resolve, reject) => {
if (success) resolve(value);
else reject(new Error('Failed'));
});
fetch('/api/data')
.then(res => res.json())
.then( => (data))
.( (err))
.( ());