Habilidades javascript-mastery
📦

javascript-mastery

Seguro

Master JavaScript with this complete reference guide

Learn JavaScript fundamentals and advanced concepts in one comprehensive reference. From primitives to async patterns, get clear explanations with practical code examples.

Suporta: Claude Codex Code(CC)
🥉 73 Bronze
1

Baixar o ZIP da skill

2

Upload no Claude

Vá em Configurações → Capacidades → Skills → Upload skill

3

Ative e comece a usar

Testar

A utilizar "javascript-mastery". Explain how closures work in JavaScript

Resultado esperado:

A closure is a function that remembers its lexical scope even when executed outside that scope. Example: A counter function that maintains a private count variable across multiple calls, incrementing each time the returned function is invoked.

A utilizar "javascript-mastery". What is the output: console.log(1); setTimeout(() => console.log(2), 0); Promise.resolve().then(() => console.log(3)); console.log(4);

Resultado esperado:

Output: 1, 4, 3, 2. Explanation: Synchronous code runs first (1, 4), then microtasks like Promise callbacks (3), then macrotasks like setTimeout (2).

Auditoria de Segurança

Seguro
v1 • 2/25/2026

This skill is a JavaScript educational reference document containing code examples for learning purposes. Static analysis flagged 89 patterns (template literals, fetch examples, documentation URLs) that are false positives - all are JavaScript syntax examples in markdown, not executable code. No security risks detected. Safe for publication.

1
Arquivos analisados
648
Linhas analisadas
0
achados
1
Total de auditorias
Nenhum problema de segurança encontrado
Auditado por: claude

Pontuação de qualidade

38
Arquitetura
100
Manutenibilidade
87
Conteúdo
50
Comunidade
100
Segurança
87
Conformidade com especificações

O Que Você Pode Construir

Learning JavaScript Fundamentals

Beginners can use this skill to understand core JavaScript concepts with clear examples and explanations.

Debugging Tricky Behavior

Experienced developers can reference this skill when encountering unexpected JavaScript behavior like type coercion or this binding issues.

Teaching and Code Review

Educators and team leads can use this skill to explain JavaScript concepts during teaching sessions or code reviews.

Tente Estes Prompts

Explain a JavaScript Concept
Explain how JavaScript closures work with a simple example.
Compare JavaScript Features
What is the difference between == and === in JavaScript? Show examples of when each should be used.
Debug JavaScript Behavior
Why does this code output undefined instead of the expected value? Explain the scope rules involved.
Advanced Async Patterns
Show me how to handle multiple async operations in JavaScript. Compare Promise.all, Promise.race, and sequential await with examples.

Melhores Práticas

  • Use strict equality (===) instead of loose equality (==) to avoid type coercion bugs
  • Prefer let and const over var for block-scoped variables and to avoid hoisting issues
  • Use async/await for clearer asynchronous code instead of nested callbacks or promise chains

Evitar

  • Using var which is function-scoped and can lead to hoisting confusion
  • Callback hell - nesting multiple callbacks instead of using Promises or async/await
  • Modifying objects that are declared with const, which can cause unexpected mutations

Perguntas Frequentes

What is the difference between null and undefined?
undefined means a variable has been declared but not assigned a value. null is an intentional assignment representing no value. typeof undefined is 'undefined', while typeof null is 'object' (a historical bug).
Why use arrow functions instead of regular functions?
Arrow functions provide shorter syntax and lexically bind the this value, making them ideal for callbacks and methods that should not rebind this. They cannot be used as constructors.
What does the spread operator (...) do?
The spread operator expands an iterable (array or object) into individual elements. It is used for copying arrays/objects, merging collections, or passing array elements as function arguments.
How does the event loop work in JavaScript?
JavaScript executes synchronous code first, then processes all microtasks (Promises), then macrotasks (setTimeout, setInterval). This ordering explains why Promise callbacks run before setTimeout even with zero delay.
What is the difference between map, filter, and reduce?
map transforms each element and returns a new array. filter keeps elements matching a condition. reduce accumulates all elements into a single value. All three are pure functions that do not mutate the original array.
When should I use optional chaining (?.) and nullish coalescing (??)?
Use optional chaining to safely access nested properties without errors if intermediate values are null or undefined. Use nullish coalescing to provide default values only when a value is null or undefined, not for all falsy values like 0 or empty strings.

Detalhes do Desenvolvedor

Estrutura de arquivos

📄 SKILL.md