javascript
Installation
SKILL.md
Critical Patterns
Async/Await (REQUIRED)
// ✅ ALWAYS: Use async/await over .then() chains
async function fetchUserData(userId) {
try {
const response = await fetch(`/api/users/${userId}`);
if (!response.ok) throw new Error('User not found');
return await response.json();
} catch (error) {
console.error('Failed to fetch user:', error);
throw error;
}
}