js-mastery

Explain JavaScript concepts including closures, scope, and async programming.

7|2|Updated Jan 28, 2026
One-click install
npx skills add https://github.com/LuisSambrano/antigravity-config --skill js-mastery
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: js-mastery
Source: https://github.com/LuisSambrano/antigravity-config/tree/main/skills/1-core/js-mastery
Command: npx skills add https://github.com/LuisSambrano/antigravity-config --skill js-mastery

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a comprehensive reference for core JavaScript concepts, helping developers understand and debug JavaScript code more effectively.

Core Features & Use Cases

  • Fundamental Concepts: Covers primitives, scope, closures, this keyword, and more.
  • Asynchronous Programming: Explains event loop, callbacks, Promises, and async/await.
  • Functional Programming: Details pure functions, map, filter, reduce, currying, and composition.
  • Modern JS: Includes destructuring, spread/rest, modules, optional chaining, and nullish coalescing.
  • Use Case: When encountering unexpected JavaScript behavior, consult this Skill to understand the underlying language mechanics, such as scope or type coercion.

Quick Start

Explain the concept of closures in JavaScript.

Frequently Asked Questions about js-mastery

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do JavaScript closures work and when should I use them?

JavaScript closures occur when an inner function retains access to its outer function's scope after execution. This reference explains closures, scope chains, and their use in data encapsulation and function factories.

What is the JavaScript event loop and how does it handle asynchronous programming?

The JavaScript event loop manages asynchronous operations by processing the call stack and task queue. This reference details event loop mechanics, callbacks, Promises, and async/await for non-blocking code execution.

How do I debug unexpected JavaScript behavior caused by type coercion?

Debug unexpected JavaScript behavior by consulting this reference to understand underlying mechanics like type coercion, primitive types, and scope. It clarifies how implicit conversions and hoisting alter execution flow.

What are pure functions in JavaScript and how do map, filter, and reduce work?

Pure functions in JavaScript return consistent outputs without side effects. This reference details functional programming concepts including map, filter, reduce, currying, and composition for predictable code.

How do I use modern ES6+ features like destructuring and optional chaining in JavaScript?

Use modern ES6+ features like destructuring, spread/rest operators, and optional chaining to write concise JavaScript. This reference explains these features along with modules and nullish coalescing.