JavaScript

Explains JavaScript core concepts including ES6+ syntax and asynchronous programming.

Updated Sep 25, 2021
One-click install
npx skills add https://github.com/shseok/TIL --skill javascript-shseok
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: JavaScript
Source: https://github.com/shseok/TIL/tree/main/JavaScript
Command: npx skills add https://github.com/shseok/TIL --skill javascript-shseok

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a comprehensive guide to understanding and implementing JavaScript, from basic syntax and variables to advanced concepts like closures, asynchronous programming, and modern ES6+ features.

Core Features & Use Cases

  • Core Concepts: Covers variables (var, let, const), data types, operators, and control flow.
  • Object-Oriented Programming: Explains objects, methods, this keyword, constructors, and prototypes.
  • Asynchronous JavaScript: Details AJAX, Promises, async/await, and event handling.
  • Modern Features: Explores ES6+ syntax like arrow functions, destructuring, spread/rest operators, and optional chaining.
  • Use Case: A developer can use this Skill to quickly look up syntax, understand complex JavaScript behaviors, or learn new language features for their projects.

Quick Start

Learn about JavaScript's let and const variable declarations.

Frequently Asked Questions about JavaScript

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

FAQPage Schema
How do I use let and const for variable declarations in JavaScript?

Use let and const for block-scoped variable declarations in JavaScript. let allows reassignment, while const creates an immutable binding for variables that should not be reassigned.

What is the difference between var, let, and const in JavaScript?

The difference between var, let, and const in JavaScript is that var is function-scoped, while let and const are block-scoped. const additionally prevents variable reassignment after initialization.

How do Promises and async/await work for asynchronous programming in JavaScript?

Promises and async/await handle asynchronous programming in JavaScript by allowing code to pause execution until operations complete. async/await provides syntax built on Promises to write asynchronous code sequentially.

How do I use ES6 features like arrow functions and destructuring in JavaScript?

Use ES6 features like arrow functions and destructuring in JavaScript to write concise syntax. Arrow functions bind the lexical this context, while destructuring unpacks values from arrays or objects into distinct variables.

What are closures and how do they work with JavaScript functions?

Closures in JavaScript functions occur when an inner function retains access to its outer function's scope. This mechanism allows data encapsulation and state persistence after the outer function executes.

How do I use the this keyword and prototypes in JavaScript objects?

Use the this keyword in JavaScript objects to reference the current execution context, and use prototypes to share methods across object instances. Constructors initialize objects, setting up properties for inheritance.