<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Khadija Daruwala</title>
    <description>The latest articles on DEV Community by Khadija Daruwala (@kddeveloper).</description>
    <link>https://dev.to/kddeveloper</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4021858%2Ff227ad3f-f7ba-4b26-8e2f-680d2750c3ee.png</url>
      <title>DEV Community: Khadija Daruwala</title>
      <link>https://dev.to/kddeveloper</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kddeveloper"/>
    <language>en</language>
    <item>
      <title>Jira Without the Jargon: A Developer's Guide to Actually Using It</title>
      <dc:creator>Khadija Daruwala</dc:creator>
      <pubDate>Thu, 06 Aug 2026 15:54:40 +0000</pubDate>
      <link>https://dev.to/kddeveloper/jira-without-the-jargon-a-developers-guide-to-actually-using-it-4flo</link>
      <guid>https://dev.to/kddeveloper/jira-without-the-jargon-a-developers-guide-to-actually-using-it-4flo</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9ctmkj67oqnvr0aqozge.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9ctmkj67oqnvr0aqozge.jpg" alt="A Jira Kanban board showing tasks moving from To Do to Done" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt; Jira doesn't have to be scary. Here's a clear, no-fluff guide to the concepts that actually matter.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;p&gt;When I first started using Jira, it felt like walking into a spaceship cockpit. There were boards, backlogs, epics, sprints, JQL, and a dozen other terms I didn't understand.&lt;/p&gt;

&lt;p&gt;But after using it daily for a while, I realized Jira is actually pretty simple once you know what matters.&lt;/p&gt;

&lt;p&gt;So here's my guide-a clear, plain-English walkthrough of how I use Jira as a developer. No corporate jargon. No "Agile transformation" talk. Just the stuff that helps you ship work without losing your mind.&lt;/p&gt;




&lt;h2&gt;
  
  
  What Is Jira?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Jira&lt;/strong&gt; is a project management and issue tracking tool developed by Atlassian. It helps teams plan, track, and manage work throughout the software development lifecycle.&lt;/p&gt;

&lt;p&gt;In simple terms: it's where your team writes down what needs to be done, who's doing it, and when it's done.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Jira is used for:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Software and hardware development&lt;/li&gt;
&lt;li&gt;Agile methodologies (Scrum, Kanban)&lt;/li&gt;
&lt;li&gt;Bug tracking and task management&lt;/li&gt;
&lt;li&gt;Release and sprint planning&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Think of it like a to-do list on steroids-except it's for entire teams and comes with boards, filters, and reports.&lt;/p&gt;




&lt;h2&gt;
  
  
  Project Types: Team vs Company
&lt;/h2&gt;

&lt;p&gt;When you create a project in Jira, you'll see two main options: &lt;strong&gt;Team-managed&lt;/strong&gt; and &lt;strong&gt;Company-managed&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Team-managed Project
&lt;/h3&gt;

&lt;p&gt;A Team-managed project gives individual teams full control over how their project is configured.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Characteristics:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Easy to set up-no Jira administrator required&lt;/li&gt;
&lt;li&gt;Each project has its own configuration&lt;/li&gt;
&lt;li&gt;Workflows, issue types, and fields can be customized per project&lt;/li&gt;
&lt;li&gt;Ideal for small teams or pilot projects&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Advantages:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Fast onboarding&lt;/li&gt;
&lt;li&gt;Flexible and adaptable&lt;/li&gt;
&lt;li&gt;Independent from other projects&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Disadvantages:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Inconsistent configurations across teams&lt;/li&gt;
&lt;li&gt;Limited advanced features (e.g., no Components, limited custom fields)&lt;/li&gt;
&lt;li&gt;Harder to scale or standardize across an organization&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Best for:&lt;/strong&gt; Small teams wanting full control over their workflow without admin dependency.&lt;/p&gt;




&lt;h3&gt;
  
  
  Company-managed Project
&lt;/h3&gt;

&lt;p&gt;Company-managed projects are centrally administered by Jira administrators.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Characteristics:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Shared workflows, issue types, screens, and permissions&lt;/li&gt;
&lt;li&gt;Configured and maintained by Jira administrators&lt;/li&gt;
&lt;li&gt;Supports advanced customization and cross-project standardization&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Advantages:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Consistent processes across teams&lt;/li&gt;
&lt;li&gt;Easier to scale and govern&lt;/li&gt;
&lt;li&gt;Full feature set (Components, advanced permissions, roadmaps)&lt;/li&gt;
&lt;li&gt;Recommended for medium to large organizations&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Disadvantages:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Requires administrator involvement for changes&lt;/li&gt;
&lt;li&gt;Less flexible for individual teams&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Best for:&lt;/strong&gt; Organizations needing standardized workflows, advanced permissions, or cross-team collaboration.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;Team-managed&lt;/th&gt;
&lt;th&gt;Company-managed&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Setup&lt;/td&gt;
&lt;td&gt;Self-service by team&lt;/td&gt;
&lt;td&gt;Requires Jira admin&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Configuration&lt;/td&gt;
&lt;td&gt;Independent per project&lt;/td&gt;
&lt;td&gt;Shared across projects&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Flexibility&lt;/td&gt;
&lt;td&gt;High&lt;/td&gt;
&lt;td&gt;Medium (standardized)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Advanced Features&lt;/td&gt;
&lt;td&gt;Limited&lt;/td&gt;
&lt;td&gt;Full support&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Best For&lt;/td&gt;
&lt;td&gt;Small, autonomous teams&lt;/td&gt;
&lt;td&gt;Medium/large orgs&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Pro tip:&lt;/strong&gt; Don't overthink this. Just pick the one your team uses and move on.&lt;/p&gt;




&lt;h2&gt;
  
  
  Boards: Where Work Lives
&lt;/h2&gt;

&lt;p&gt;A &lt;strong&gt;board&lt;/strong&gt; is a visual representation of work, showing tasks as they move through different stages.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example workflow:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;To Do → In Progress → Code Review → Testing → Done
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Boards help teams monitor progress, identify bottlenecks, and maintain flow.&lt;/p&gt;

&lt;p&gt;Jira has two main board types:&lt;/p&gt;




&lt;h3&gt;
  
  
  Kanban Board
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Kanban&lt;/strong&gt; is a continuous workflow with no sprints. Work moves continuously from left to right.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Workflow:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Backlog → To Do → In Progress → Review → Testing → Done
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Best for:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Maintenance and support teams&lt;/li&gt;
&lt;li&gt;DevOps and IIoT projects&lt;/li&gt;
&lt;li&gt;Continuous delivery environments&lt;/li&gt;
&lt;li&gt;Hardware engineering with ongoing tasks&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Kanban emphasizes limiting work in progress (WIP) and optimizing flow efficiency.&lt;/p&gt;




&lt;h3&gt;
  
  
  Scrum Board
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Scrum&lt;/strong&gt; organizes work into fixed-length sprints.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Typical sprint duration:&lt;/strong&gt; 1–3 weeks&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Sprint cycle:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Sprint Planning → Development → Testing → Sprint Review → Retrospective
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Best for:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Feature development&lt;/li&gt;
&lt;li&gt;Teams working in iterative cycles&lt;/li&gt;
&lt;li&gt;Product teams with clear sprint goals&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Scrum boards display sprint backlog, active sprint, and completed work.&lt;/p&gt;




&lt;h2&gt;
  
  
  Backlog: Your "Someday" List
&lt;/h2&gt;

&lt;p&gt;The &lt;strong&gt;backlog&lt;/strong&gt; is a prioritized list of future work items not currently in progress.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Typical backlog items:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;New features (Stories)&lt;/li&gt;
&lt;li&gt;Bugs&lt;/li&gt;
&lt;li&gt;Technical debt&lt;/li&gt;
&lt;li&gt;Improvements&lt;/li&gt;
&lt;li&gt;Research or discovery tasks&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The Product Owner or Project Manager owns backlog prioritization, ensuring the team works on the highest-value items first.&lt;/p&gt;




&lt;h2&gt;
  
  
  Issues: The Building Blocks
&lt;/h2&gt;

&lt;p&gt;An &lt;strong&gt;issue&lt;/strong&gt; is the smallest unit of work in Jira. Think of it like a task card.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Core fields:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Issue Type&lt;/li&gt;
&lt;li&gt;Summary&lt;/li&gt;
&lt;li&gt;Description&lt;/li&gt;
&lt;li&gt;Status&lt;/li&gt;
&lt;li&gt;Assignee&lt;/li&gt;
&lt;li&gt;Priority&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Optional fields:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Labels&lt;/li&gt;
&lt;li&gt;Components&lt;/li&gt;
&lt;li&gt;Fix Version&lt;/li&gt;
&lt;li&gt;Epic Link&lt;/li&gt;
&lt;li&gt;Story Points&lt;/li&gt;
&lt;li&gt;Attachments&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Issue Types: What's What
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Epic
&lt;/h3&gt;

&lt;p&gt;An &lt;strong&gt;Epic&lt;/strong&gt; is a large body of work that can be broken into multiple Stories.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt; &lt;em&gt;Customer Portal&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Epics provide a high-level container for tracking related work across sprints.&lt;/p&gt;




&lt;h3&gt;
  
  
  Story
&lt;/h3&gt;

&lt;p&gt;A &lt;strong&gt;Story&lt;/strong&gt; represents a user-facing feature, often written in user-story format.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
&lt;em&gt;As a customer, I want to reset my password so that I can regain access.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Stories are small enough to be completed within a sprint.&lt;/p&gt;




&lt;h3&gt;
  
  
  Task
&lt;/h3&gt;

&lt;p&gt;A &lt;strong&gt;Task&lt;/strong&gt; is general work not tied to a user story.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt; &lt;em&gt;Upgrade Docker version&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Tasks can be technical, administrative, or operational.&lt;/p&gt;




&lt;h3&gt;
  
  
  Bug
&lt;/h3&gt;

&lt;p&gt;A &lt;strong&gt;Bug&lt;/strong&gt; represents a defect or issue in the system.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt; &lt;em&gt;Temperature sensor displays incorrect values.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Bugs are prioritized based on severity and impact.&lt;/p&gt;




&lt;h3&gt;
  
  
  Sub-task
&lt;/h3&gt;

&lt;p&gt;A &lt;strong&gt;Sub-task&lt;/strong&gt; is a smaller piece of work within a parent issue (Story, Task, or Bug).&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Story:&lt;/strong&gt; Implement Login&lt;br&gt;
&lt;strong&gt;Sub-task:&lt;/strong&gt; Create Login Button&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Sub-tasks help break down complex work into manageable units.&lt;/p&gt;




&lt;h2&gt;
  
  
  Workflows: How Work Moves
&lt;/h2&gt;

&lt;p&gt;A &lt;strong&gt;workflow&lt;/strong&gt; defines the lifecycle of an issue—from creation to completion.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Typical workflow states:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;To Do → In Progress → Code Review → Testing → Done
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Workflows can include:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Statuses:&lt;/strong&gt; To Do, In Progress, Done&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Transitions:&lt;/strong&gt; Move issue from one status to another&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Conditions:&lt;/strong&gt; Rules that control who can transition an issue&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Validators:&lt;/strong&gt; Checks before a transition is allowed&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Post-functions:&lt;/strong&gt; Automated actions after a transition (e.g., send notification)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Company-managed projects support advanced workflow customization, while team-managed projects offer simpler, per-project workflows.&lt;/p&gt;




&lt;h2&gt;
  
  
  Sprint Planning
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Sprint planning&lt;/strong&gt; is a Scrum ceremony where the team selects backlog items for the upcoming sprint.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key activities:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Review prioritized backlog&lt;/li&gt;
&lt;li&gt;Estimate effort (e.g., story points)&lt;/li&gt;
&lt;li&gt;Commit to sprint goals&lt;/li&gt;
&lt;li&gt;Assign issues to team members&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Sprint duration:&lt;/strong&gt; Typically 1–3 weeks, depending on team velocity and project needs.&lt;/p&gt;

&lt;p&gt;Sprints help teams deliver value incrementally and maintain a predictable cadence.&lt;/p&gt;




&lt;h2&gt;
  
  
  Roadmaps: The Big Picture
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Roadmaps&lt;/strong&gt; (or Timelines) provide a long-term, strategic view of work.&lt;/p&gt;

&lt;p&gt;They answer:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What are we building?&lt;/li&gt;
&lt;li&gt;When will it be delivered?&lt;/li&gt;
&lt;li&gt;What dependencies exist?&lt;/li&gt;
&lt;li&gt;What is the current progress?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Use cases:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Quarterly planning&lt;/li&gt;
&lt;li&gt;Product releases&lt;/li&gt;
&lt;li&gt;Hardware and software milestones&lt;/li&gt;
&lt;li&gt;Cross-team dependency tracking&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Roadmaps are especially useful in company-managed projects with full feature support.&lt;/p&gt;




&lt;h2&gt;
  
  
  Filters &amp;amp; JQL: Finding Stuff Fast
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Filters
&lt;/h3&gt;

&lt;p&gt;A &lt;strong&gt;filter&lt;/strong&gt; is a saved search that displays issues matching specific criteria.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Examples:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;My Open Issues&lt;/li&gt;
&lt;li&gt;High Priority Bugs&lt;/li&gt;
&lt;li&gt;Sprint 10 Tasks&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Filters can be shared with teams and used in dashboards.&lt;/p&gt;




&lt;h3&gt;
  
  
  JQL (Jira Query Language)
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;JQL&lt;/strong&gt; is Jira's query language for searching issues with precision.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Common examples:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;assignee = currentUser()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Issues assigned to me.&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;status = "In Progress"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;All issues currently in progress.&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;project = APP
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;All issues in the APP project.&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;priority = High
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;High-priority issues.&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;labels = backend
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Issues tagged with the "backend" label.&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;assignee = currentUser() AND status != Done
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;My open, incomplete issues.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;JQL supports complex queries using AND, OR, NOT, and field operators.&lt;/p&gt;




&lt;h2&gt;
  
  
  Dashboards: Your Project Health Check
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Dashboards&lt;/strong&gt; provide a high-level overview of project health using configurable gadgets.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Common gadgets:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Assigned to Me&lt;/li&gt;
&lt;li&gt;Pie Chart (by status, priority, assignee)&lt;/li&gt;
&lt;li&gt;Created vs Resolved&lt;/li&gt;
&lt;li&gt;Sprint Burndown&lt;/li&gt;
&lt;li&gt;Activity Stream&lt;/li&gt;
&lt;li&gt;Filter Results&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Dashboards help managers and developers quickly assess progress, identify bottlenecks, and track team performance.&lt;/p&gt;




&lt;h2&gt;
  
  
  Labels vs Components
&lt;/h2&gt;

&lt;p&gt;Both are used to categorize issues, but serve different purposes.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;Labels&lt;/th&gt;
&lt;th&gt;Components&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Purpose&lt;/td&gt;
&lt;td&gt;Flexible tagging&lt;/td&gt;
&lt;td&gt;Structural categorization&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Scope&lt;/td&gt;
&lt;td&gt;Free-form, ad-hoc&lt;/td&gt;
&lt;td&gt;Predefined by project&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Availability&lt;/td&gt;
&lt;td&gt;Team &amp;amp; Company-managed&lt;/td&gt;
&lt;td&gt;Company-managed only&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Use Case&lt;/td&gt;
&lt;td&gt;Cross-project tagging&lt;/td&gt;
&lt;td&gt;Module or feature ownership&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Example&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;backend&lt;/code&gt;, &lt;code&gt;urgent&lt;/code&gt;, &lt;code&gt;refactor&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;API&lt;/code&gt;, &lt;code&gt;UI&lt;/code&gt;, &lt;code&gt;Database&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Labels&lt;/strong&gt; are informal and can be created on the fly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Components&lt;/strong&gt; are formal, often tied to teams or code modules, and require admin setup.&lt;/p&gt;




&lt;h2&gt;
  
  
  Versions &amp;amp; Releases
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Versions&lt;/strong&gt; (or Fix Versions) represent planned releases or milestones.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use cases:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Track which issues are included in a release&lt;/li&gt;
&lt;li&gt;Generate release notes&lt;/li&gt;
&lt;li&gt;Monitor progress toward a version&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Version: &lt;code&gt;v2.1.0&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Issues with Fix Version = &lt;code&gt;v2.1.0&lt;/code&gt; are part of that release.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Releases can be scheduled, and progress tracked via version reports.&lt;/p&gt;




&lt;h2&gt;
  
  
  Keyboard Shortcuts
&lt;/h2&gt;

&lt;p&gt;Jira supports keyboard shortcuts to speed up navigation (press &lt;code&gt;?&lt;/code&gt; in Jira to view all).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Common shortcuts:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;c&lt;/code&gt; — Create issue&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/&lt;/code&gt; — Search (quick search)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;g&lt;/code&gt; + &lt;code&gt;i&lt;/code&gt; — Go to Issues&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;g&lt;/code&gt; + &lt;code&gt;b&lt;/code&gt; — Go to Boards&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;g&lt;/code&gt; + &lt;code&gt;d&lt;/code&gt; — Go to Dashboards&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;e&lt;/code&gt; — Edit issue&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;m&lt;/code&gt; — Move issue&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;a&lt;/code&gt; — Assign issue&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;l&lt;/code&gt; — Add label&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Enable keyboard shortcuts in your profile settings for faster workflow.&lt;/p&gt;




&lt;h2&gt;
  
  
  Quick Tips
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Write clear, concise issue summaries.&lt;/li&gt;
&lt;li&gt;Keep descriptions complete but brief.&lt;/li&gt;
&lt;li&gt;Use labels consistently across the team.&lt;/li&gt;
&lt;li&gt;Link related issues (e.g., blocks, is blocked by).&lt;/li&gt;
&lt;li&gt;Update issue status regularly to reflect real progress.&lt;/li&gt;
&lt;li&gt;Avoid duplicate issues—search before creating.&lt;/li&gt;
&lt;li&gt;Use dashboards and filters to monitor progress.&lt;/li&gt;
&lt;li&gt;Create reusable JQL filters for common queries.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  That's It
&lt;/h2&gt;

&lt;p&gt;Jira isn't perfect, but it's a solid tool once you know the basics. Start simple, keep your workflow clean, and focus on shipping work.&lt;/p&gt;

&lt;p&gt;You don't need to be a Jira expert to be productive. You just need to know enough to track your work, collaborate with your team, and ship stuff.&lt;/p&gt;

&lt;p&gt;Now go create your first issue and move it to "Done." That's the real win.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Enjoyed this?&lt;/strong&gt; Drop a comment below or share it with someone who's just starting with Jira. 🚀&lt;/p&gt;

</description>
      <category>jira</category>
      <category>productivity</category>
      <category>agile</category>
      <category>softwaredevelopment</category>
    </item>
    <item>
      <title>JavaScript , from basics to async: everything I learned and how it finally clicked</title>
      <dc:creator>Khadija Daruwala</dc:creator>
      <pubDate>Tue, 28 Jul 2026 20:19:53 +0000</pubDate>
      <link>https://dev.to/kddeveloper/javascript-from-basics-to-async-everything-i-learned-and-how-it-finally-clicked-39i2</link>
      <guid>https://dev.to/kddeveloper/javascript-from-basics-to-async-everything-i-learned-and-how-it-finally-clicked-39i2</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;I went through a deep dive on JavaScript , from variables and data types all the way to closures, the event loop, and async/await. Here's everything I put together, written the way I wish someone had explained it to me.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I recently sat down and did a proper, structured pass through JavaScript , not just picking things up as I went, but actually understanding the mechanics behind the language. I watched a few long-form courses, took notes as I went, and then rewrote those notes in a way that made sense to me. This article is basically those notes, cleaned up and expanded into something I can share.&lt;/p&gt;

&lt;p&gt;If you're coming from another language, or if JavaScript has always felt a bit slippery to you, I hope this helps. I'll explain things the way I actually think about them, not the way a textbook would.&lt;/p&gt;




&lt;h2&gt;
  
  
  Table of contents
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;What is JavaScript?&lt;/li&gt;
&lt;li&gt;Variables , let, const, and why we don't use var anymore&lt;/li&gt;
&lt;li&gt;Data types , primitive vs non-primitive&lt;/li&gt;
&lt;li&gt;Functions , declarations, expressions, and arrows&lt;/li&gt;
&lt;li&gt;Scope , where variables live and die&lt;/li&gt;
&lt;li&gt;Closures , the concept that unlocks everything&lt;/li&gt;
&lt;li&gt;The this keyword , four rules, one order&lt;/li&gt;
&lt;li&gt;Async JavaScript , callbacks, promises, async/await&lt;/li&gt;
&lt;li&gt;The event loop , how JavaScript does many things at once&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  1. What is JavaScript?
&lt;/h2&gt;

&lt;p&gt;JavaScript is a lightweight, dynamically-typed, interpreted language that follows the ECMAScript specification , which is basically the rulebook that defines what JavaScript is allowed to do and how it has to behave. Every browser that supports JavaScript is implementing those rules.&lt;/p&gt;

&lt;p&gt;A few things make it distinct from languages you might have used before:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What it's good at:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Making web pages interactive&lt;/li&gt;
&lt;li&gt;Running directly in the browser , no compilation step needed&lt;/li&gt;
&lt;li&gt;Handling user events: clicks, scrolls, keypresses&lt;/li&gt;
&lt;li&gt;Server-side apps via Node.js&lt;/li&gt;
&lt;li&gt;Mobile and desktop apps via React Native and Electron&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Key characteristics:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;JIT compiled&lt;/strong&gt; , runs instantly, no ahead-of-time compile step for the developer&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Single-threaded&lt;/strong&gt; , one thing at a time on the main thread&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dynamically typed&lt;/strong&gt; , types are figured out at runtime, not declared upfront&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Event-driven&lt;/strong&gt; , responds to events rather than just running top to bottom&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  2. Variables
&lt;/h2&gt;

&lt;p&gt;Variables store information , a user's name, the price of an item, a list of results. JavaScript has three ways to declare them and they behave differently.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Alice&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// Can't be reassigned. Use this by default.&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;age&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;25&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// Can be reassigned. Use when the value changes.&lt;/span&gt;
&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;oldWay&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;avoid this&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// Function-scoped, hoisted , causes bugs. Skip it.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;💡 &lt;strong&gt;My rule of thumb:&lt;/strong&gt; Start with &lt;code&gt;const&lt;/code&gt; for everything. Only switch to &lt;code&gt;let&lt;/code&gt; when you know the value needs to change. Never use &lt;code&gt;var&lt;/code&gt; in modern JavaScript , it has a different scoping behaviour that causes confusing bugs.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  3. Data types , primitive vs non-primitive
&lt;/h2&gt;

&lt;p&gt;This is one of those foundational things that trips people up when they first hit a bug. JavaScript has two categories of data types, and they behave completely differently when you copy them.&lt;/p&gt;

&lt;h3&gt;
  
  
  Primitive types
&lt;/h3&gt;

&lt;p&gt;Primitives are the raw, basic values. The critical thing to understand: &lt;strong&gt;they are immutable and copied by value.&lt;/strong&gt; When you assign a primitive to a new variable, you get a completely independent copy.&lt;/p&gt;

&lt;p&gt;The primitive types are: &lt;code&gt;String&lt;/code&gt;, &lt;code&gt;Number&lt;/code&gt;, &lt;code&gt;Boolean&lt;/code&gt;, &lt;code&gt;Undefined&lt;/code&gt;, &lt;code&gt;Null&lt;/code&gt;, &lt;code&gt;BigInt&lt;/code&gt;, and &lt;code&gt;Symbol&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// b gets a copy of the value 10&lt;/span&gt;
&lt;span class="nx"&gt;b&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Still 10 , changing b didn't touch a&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Non-primitive types
&lt;/h3&gt;

&lt;p&gt;Non-primitives , objects, arrays, and functions , are mutable and &lt;strong&gt;copied by reference.&lt;/strong&gt; When you assign one to a new variable, you're not copying the data. You're copying the address where that data lives in memory. Both variables now point to the same thing.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;obj1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Alice&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;obj2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;obj1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// obj2 points to the SAME object in memory&lt;/span&gt;
&lt;span class="nx"&gt;obj2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Bob&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;obj1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// "Bob" , they're the same object&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;⚠️ &lt;strong&gt;Common gotcha:&lt;/strong&gt; If you want a true independent copy of an object, you need to spread it: &lt;code&gt;const obj2 = { ...obj1 };&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Type coercion and equality
&lt;/h3&gt;

&lt;p&gt;JavaScript will automatically convert types in certain situations , this is called type coercion, and it's responsible for some of the language's most famous quirks.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;3&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// "23"  , number gets converted to a string&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;4&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;2&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// 2     , strings get converted to numbers&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;5&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// 4     , true coerces to 1&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is also why the equality operator matters:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="dl"&gt;""&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// true  , == allows coercion. Don't use this.&lt;/span&gt;
&lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;""&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// false , === checks type too. Always use this.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;✅ &lt;strong&gt;Simple rule:&lt;/strong&gt; Always use &lt;code&gt;===&lt;/code&gt;. It checks both value and type without any coercion.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  4. Functions
&lt;/h2&gt;

&lt;p&gt;A function is a reusable block of code. JavaScript has three ways to write them and they all have slightly different behaviour.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// 1. Function declaration , hoisted, can be called before it's defined&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;greet&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s2"&gt;`Hello, &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// 2. Function expression , not hoisted, stored in a variable&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;greet&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;function &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s2"&gt;`Hello, &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="c1"&gt;// 3. Arrow function , shorter syntax, no own 'this'&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;greet&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s2"&gt;`Hello, &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The most important practical difference: &lt;strong&gt;arrow functions don't have their own &lt;code&gt;this&lt;/code&gt;&lt;/strong&gt;. They inherit it from the surrounding scope. This makes them the right choice inside callbacks and methods where you don't want &lt;code&gt;this&lt;/code&gt; to change unexpectedly.&lt;/p&gt;




&lt;h2&gt;
  
  
  5. Scope
&lt;/h2&gt;

&lt;p&gt;Scope determines where a variable is accessible from. There are three kinds:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Global scope&lt;/strong&gt; , variable is accessible anywhere in the program&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Function scope&lt;/strong&gt; , variable is only accessible inside the function it was declared in&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Block scope&lt;/strong&gt; , variable is only accessible inside the &lt;code&gt;{ }&lt;/code&gt; block it was declared in. This is what &lt;code&gt;let&lt;/code&gt; and &lt;code&gt;const&lt;/code&gt; use.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nb"&gt;global&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;everywhere&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;example&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;insideFunction&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;only here&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;insideBlock&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;only inside this if block&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;insideBlock&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// ✅ works&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="c1"&gt;// console.log(insideBlock); // ❌ ReferenceError&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// console.log(insideFunction); // ❌ ReferenceError&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  6. Closures , the concept that unlocks everything
&lt;/h2&gt;

&lt;p&gt;Once this clicked for me, a lot of things about JavaScript started making sense.&lt;/p&gt;

&lt;p&gt;A closure is what happens when a function remembers the variables from the scope it was created in , &lt;strong&gt;even after that outer function has finished running.&lt;/strong&gt; The inner function carries its environment with it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;makeCounter&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;count&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// This variable lives inside makeCounter&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;function &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;count&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// The returned function closes over 'count'&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;count&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;counter&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;makeCounter&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="c1"&gt;// makeCounter() has finished running , but count is still alive&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;counter&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt; &lt;span class="c1"&gt;// 1&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;counter&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt; &lt;span class="c1"&gt;// 2&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;counter&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt; &lt;span class="c1"&gt;// 3&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;count&lt;/code&gt; variable should have disappeared when &lt;code&gt;makeCounter()&lt;/code&gt; finished. But because the returned function still references it, JavaScript keeps it alive. The returned function and its environment together form a closure.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;🔑 &lt;strong&gt;Why it matters:&lt;/strong&gt; Closures are the basis for module patterns, private variables, event handlers that remember state, and how React hooks like &lt;code&gt;useState&lt;/code&gt; work under the hood.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  7. The &lt;code&gt;this&lt;/code&gt; keyword , four rules, one order
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;this&lt;/code&gt; is one of those things that seems confusing until you know the four rules. Once you know them and the order to check them, every &lt;code&gt;this&lt;/code&gt; question becomes answerable.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;The key insight:&lt;/strong&gt; &lt;code&gt;this&lt;/code&gt; is not set when you write the function. It's set at the moment the function is called. Think of it like the word "me" in English , who "me" refers to depends entirely on who is speaking.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Here are the four rules in priority order, highest to lowest:&lt;/p&gt;

&lt;h3&gt;
  
  
  Priority 1 - &lt;code&gt;new&lt;/code&gt; binding (highest priority)
&lt;/h3&gt;

&lt;p&gt;When you call a function with &lt;code&gt;new&lt;/code&gt;, JavaScript creates a brand-new blank object and sets &lt;code&gt;this&lt;/code&gt; to point at it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;User&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// 'this' = the brand-new object being created&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;alex&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;User&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Alex&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;alex&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// "Alex"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Priority 2 - Explicit binding (call, apply, bind)
&lt;/h3&gt;

&lt;p&gt;When you use &lt;code&gt;.call()&lt;/code&gt;, &lt;code&gt;.apply()&lt;/code&gt;, or &lt;code&gt;.bind()&lt;/code&gt;, you manually tell the function what &lt;code&gt;this&lt;/code&gt; should be.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;showName&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;dog&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Buddy&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="nx"&gt;showName&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;call&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;dog&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// "Buddy" , you forced this = dog&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;.call()&lt;/code&gt; and &lt;code&gt;.apply()&lt;/code&gt; run the function immediately&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;.bind()&lt;/code&gt; returns a new function with &lt;code&gt;this&lt;/code&gt; permanently locked&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Priority 3 - Implicit binding (look left of the dot)
&lt;/h3&gt;

&lt;p&gt;When a function is called as a method on an object, look to the left of the dot at the moment it's called. That object is &lt;code&gt;this&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;cat&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Whiskers&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nf"&gt;meow&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// 'this' = cat&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="nx"&gt;cat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;meow&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// "Whiskers" ✅&lt;/span&gt;

&lt;span class="c1"&gt;// Watch out , losing the binding&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;fn&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;cat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;meow&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nf"&gt;fn&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// undefined ❌ , no dot, this = global&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Priority 4 - Default binding (lowest priority)
&lt;/h3&gt;

&lt;p&gt;If none of the above apply, &lt;code&gt;this&lt;/code&gt; falls back to the global object (&lt;code&gt;window&lt;/code&gt; in browsers) or &lt;code&gt;undefined&lt;/code&gt; in strict mode.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;standalone&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// window (browser) or undefined (strict mode)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nf"&gt;standalone&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Arrow functions - the exception to all rules
&lt;/h3&gt;

&lt;p&gt;Arrow functions don't have their own &lt;code&gt;this&lt;/code&gt;. They inherit it from wherever they were written. This is exactly why they're used inside callbacks and class methods.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;timer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;MyTimer&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;start&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;function &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;setTimeout&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="c1"&gt;// Arrow function inherits 'this' from start()&lt;/span&gt;
      &lt;span class="c1"&gt;// start() was called as timer.start() → this = timer ✅&lt;/span&gt;
      &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="nx"&gt;timer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;start&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// "MyTimer"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  8. Async JavaScript - callbacks, promises, async/await
&lt;/h2&gt;

&lt;p&gt;At its core, JavaScript is synchronous and single-threaded. But the web is full of things that take time , API calls, timers, file reads. Here's how JavaScript handles that without freezing the page.&lt;/p&gt;

&lt;h3&gt;
  
  
  Callbacks - the original solution
&lt;/h3&gt;

&lt;p&gt;A callback is just a function you pass into another function to be called later.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nf"&gt;setTimeout&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;This runs after 2 seconds&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="mi"&gt;2000&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;This runs immediately&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The problem comes when you need to chain async operations , each one depending on the previous. You end up with deeply nested callbacks. Developers called it "callback hell."&lt;/p&gt;

&lt;h3&gt;
  
  
  Promises - a better model
&lt;/h3&gt;

&lt;p&gt;A Promise represents the eventual result of an async operation. It's always in one of three states: &lt;strong&gt;pending → fulfilled&lt;/strong&gt; or &lt;strong&gt;pending → rejected&lt;/strong&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://api.example.com/users&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;then&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;then&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;catch&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Something went wrong:&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Chaining &lt;code&gt;.then()&lt;/code&gt; keeps code flat and readable. Always use &lt;code&gt;.catch()&lt;/code&gt; , it catches both rejections and any exceptions thrown inside the chain.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When you need multiple promises at once:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Wait for ALL to complete , fails fast if any one fails&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;users&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;posts&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;all&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="nf"&gt;fetchUsers&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="nf"&gt;fetchPosts&lt;/span&gt;&lt;span class="p"&gt;()]);&lt;/span&gt;

&lt;span class="c1"&gt;// Wait for all to settle, even if some fail&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;results&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;allSettled&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="nf"&gt;req1&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="nf"&gt;req2&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="nf"&gt;req3&lt;/span&gt;&lt;span class="p"&gt;()]);&lt;/span&gt;

&lt;span class="c1"&gt;// Return whichever resolves or rejects first&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;winner&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;race&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="nf"&gt;slow&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="nf"&gt;fast&lt;/span&gt;&lt;span class="p"&gt;()]);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  async/await - promises with clean syntax
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;async/await&lt;/code&gt; doesn't replace promises , it's nicer syntax on top of them. An &lt;code&gt;async&lt;/code&gt; function always returns a promise. &lt;code&gt;await&lt;/code&gt; pauses execution inside that function until a promise settles.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;loadUser&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`/api/users/&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;user&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Failed to load user:&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The code reads top-to-bottom like synchronous code, but under the hood it's non-blocking and promise-based. This is the pattern you'll use in modern JavaScript.&lt;/p&gt;




&lt;h2&gt;
  
  
  9. The event loop , how JavaScript does many things at once
&lt;/h2&gt;

&lt;p&gt;This is the one that made everything else make sense for me.&lt;/p&gt;

&lt;p&gt;JavaScript is single-threaded , one main thread, one thing at a time. Yet it handles user clicks, API calls, and timers without freezing. That's the event loop's job.&lt;/p&gt;

&lt;p&gt;Here's what's happening:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Call stack&lt;/strong&gt; , tracks the currently executing function. Code runs line by line, functions are pushed on when called and popped off when they finish.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Web APIs&lt;/strong&gt; , the browser handles background tasks like &lt;code&gt;fetch()&lt;/code&gt; and &lt;code&gt;setTimeout()&lt;/code&gt; outside the main thread.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Microtask queue&lt;/strong&gt; , holds callbacks from completed Promises (&lt;code&gt;.then()&lt;/code&gt;, &lt;code&gt;async/await&lt;/code&gt;). &lt;strong&gt;Processed first, always.&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Callback queue (macrotask queue)&lt;/strong&gt; , holds callbacks from timers and DOM events. &lt;strong&gt;Processed after microtasks.&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The rule the event loop follows:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Run everything synchronous on the call stack&lt;/li&gt;
&lt;li&gt;Run &lt;strong&gt;all&lt;/strong&gt; microtasks (Promises)&lt;/li&gt;
&lt;li&gt;Run &lt;strong&gt;one&lt;/strong&gt; macrotask (setTimeout, etc.)&lt;/li&gt;
&lt;li&gt;Go back to step 2&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This explains the most common JavaScript output question:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;1. Start&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nf"&gt;setTimeout&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;2. Timeout&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;then&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;3. Promise&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;4. End&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. Start
4. End
3. Promise   ← microtask, runs before the timeout
2. Timeout   ← macrotask, runs last
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Even though &lt;code&gt;setTimeout&lt;/code&gt; has a delay of 0ms, the Promise callback still runs first because &lt;strong&gt;microtasks always drain before macrotasks run&lt;/strong&gt;. The 0ms means "as soon as possible after the microtask queue is empty" , not "immediately."&lt;/p&gt;




&lt;h2&gt;
  
  
  Wrapping up
&lt;/h2&gt;

&lt;p&gt;That's everything from my deep dive into JavaScript. It took a while for some of these concepts to really click , especially closures, &lt;code&gt;this&lt;/code&gt; binding, and the event loop , but once they did, I started being able to reason about code rather than just guessing at it.&lt;/p&gt;

&lt;p&gt;If something here didn't land on first read, come back to it after you've written a few async functions or hit the bug it describes. Some things only make sense once you've seen the problem they solve.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Based on my notes from:&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;em&gt;&lt;a href="https://www.youtube.com/watch?v=R9I85RhI7Cg" rel="noopener noreferrer"&gt;Codevolution , JavaScript Tutorial for Beginners&lt;/a&gt;&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;a href="https://www.youtube.com/watch?v=XIOLqoPHCJ4" rel="noopener noreferrer"&gt;Async JavaScript deep dive&lt;/a&gt;&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;a href="https://www.youtube.com/watch?v=exBgWAIeIeg" rel="noopener noreferrer"&gt;The event loop explained&lt;/a&gt;&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;If this helped you, drop a reaction or a comment , I'm writing more of these and your feedback helps me know what to cover next.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>async</category>
      <category>callback</category>
    </item>
  </channel>
</rss>
