#1 India's Top IT Training Institute
×

About Uncodemy

Know more about who we are and what we stand for.

About Us

About Us

Discover our mission to equip individuals with essential IT skills and industry expertise.

Read More →
UnCodeMy Gallery

UnCodeMy Gallery

Explore highlights from our IT training sessions and success stories.

Read More →
Mentors

Mentors

Meet the industry experts who train and guide you through your course.

Read More →
Free Resources

Free Resources

Free tutorials, interview questions, tools and calculators to help you learn.

Explore →
×

Free Resources

Learn, practice and plan your career — bilkul free.

Tutorials

Tutorials

Step-by-step written tutorials to learn any technology at your own pace.

Read More →
Free Counselling

Free Counselling

Book a free video counselling session and pick the right course for you.

Read More →
Online Compiler

Online Compiler

Write, run and test your code online — no setup required.

Read More →

JavaScript Notes PDF

Free JavaScript notes PDF: variables, functions, closures, array methods, ES6, DOM, events, event loop, promises, async/await, fetch and projects.

17 pages · 165 KB · PDF · Updated 5 Nov 2026

Prepared by: Uncodemy trainer team  ·  Reviewed by: Uncodemy  ·  Last reviewed: 5 Nov 2026

Quick Answer

Uncodemy's JavaScript notes PDF explains the language of the web in 17 pages: variables and data types, operators, functions and closures, arrays and objects, ES6 features, the DOM, events and delegation, the event loop, promises, async/await, the Fetch API, localStorage and debugging. Every topic has a commented code example, and the notes end with 7 projects and 10 practice questions. It is free to download after a short form.

Key takeaways

  • Use const by default, let when the value changes, and avoid var; always compare with ===.
  • map, filter, reduce and find are explained with one array and their outputs, side by side.
  • The DOM sections show how to select, change, create and remove elements, and why textContent is safer than innerHTML.
  • The event loop diagram explains why a promise callback runs before a setTimeout of 0 ms.
  • fetch does not fail on a 404, so the notes always check res.ok before reading the JSON.

About these JavaScript notes

This page offers Uncodemy's JavaScript notes as a free PDF. JavaScript is the programming language that makes web pages interactive: button clicks, form checks, menus and live data. It runs in every browser and also on servers through Node.js. The notes explain each idea in simple words and back it with a short, commented code example that shows the output, so you can run it in the browser console and see the same result.

Please note: these are original Uncodemy learning notes, not the official language specification. JavaScript gets new features every year, so check MDN Web Docs when you need every option of a method.

What's inside the JavaScript notes

The PDF has 17 pages arranged in 14 numbered sections. Here is what each section covers.

1. Start with JavaScript

What JavaScript does next to HTML and CSS, adding a script with defer, a first app.js with console.log and a click listener, and using the browser Console (F12) to see output and errors.

2. Variables and data types

let, const and var compared on scope and reassignment, the data types (number, string, boolean, undefined, null, object, bigint and symbol), typeof, template literals, string methods, type conversion, strict equality and the list of falsy values.

3. Operators and control flow

Arithmetic, comparison, logical, assignment and nullish operators (?? and ?.), if and else if, the ternary operator, switch, and the for, while, for...of and for...in loops, with break, continue and return.

4. Functions

Function declarations, function expressions and arrow functions, default parameters, rest parameters, spread, callbacks, scope and closures (with a private counter example), and how this works in arrow functions.

5. Arrays and objects

A table of array methods (push, pop, shift, unshift, map, filter, reduce, find, includes, sort, slice and splice), objects with methods, dot and bracket access, Object.keys and Object.entries, and JSON with JSON.stringify and JSON.parse.

6. ES6 features

A table of modern features with an example and a reason for each, then array and object destructuring, spread copies, optional chaining, classes with inheritance and a private field, modules with import and export, and Map and Set.

7. The DOM

The page as a tree of nodes (with a diagram), getElementById, querySelector and querySelectorAll, changing text, styles, classes and attributes, creating and removing elements, and the XSS risk of putting user text into innerHTML.

8. Events

A table of common events (click, input, change, submit, keydown, mouseover, DOMContentLoaded, scroll and resize), addEventListener with event.target, preventDefault on forms, event bubbling, event delegation with closest(), and a counter mini project.

9. Asynchronous JavaScript

Why single-threaded JavaScript needs async code (the restaurant waiter idea), setTimeout, callback hell, and the event loop with the call stack, Web APIs and the microtask and task queues, plus an output-order puzzle.

10. Promises

The three promise states with a diagram, creating a promise with resolve and reject, chaining then, catch and finally, and a table of Promise.all, allSettled, race and any.

11. Async / await

The same promise flow written with async and await inside try, catch and finally, and why two awaits in a row are slower than Promise.all.

12. Fetch API and storage

A GET request with error handling and res.ok, a POST request with JSON headers and body, showing the result on the page, and saving data in localStorage with JSON.

13. Errors and debugging

ReferenceError, TypeError, SyntaxError and RangeError with common causes, try, catch, finally and throw, and debugging with console.table, the debugger statement and breakpoints in the Sources tab.

14. Projects and practice

Seven projects (counter and colour changer, to-do list, form validator, quiz app, weather or user app, stopwatch, and image gallery with a modal), a common mistakes table and 10 practice questions.

How to use these notes to learn JavaScript

JavaScript makes sense only when you run it. Open the browser console or a code editor next to the PDF.

  • Run every example and check that your output matches the comment in the notes.
  • Change the inputs and predict the output before you press Enter.
  • For async code, write the output order on paper first, then run it to check.
  • After each section, build a tiny page that uses it, for example a click counter after the events section.

A simple three-pass method works well. In the first pass, read one section and run its examples. In the second pass, close the notes and write the same examples from memory, then compare and fix. In the third pass, a day or two later, answer the related practice questions aloud as if in an interview and build one project from section 14.

Syntax to remember

  • const for values that do not change, let for values that do; === for comparison.
  • Falsy values: false, 0, "", null, undefined and NaN.
  • arr.map(fn) and arr.filter(fn) return new arrays; arr.reduce((total, n) => total + n, 0) returns one value.
  • Sort numbers with arr.sort((a, b) => a - b).
  • const { name, age = 18 } = obj; for destructuring with a default value.
  • user?.address?.city ?? "No city" to read missing data safely.
  • await only inside an async function, wrapped in try and catch.

Common mistakes beginners make

  • Using == and getting surprises from type conversion.
  • Running a script before the HTML exists; use defer or put the script at the end of the body.
  • Forgetting await, so the variable holds a pending promise instead of the data.
  • Not checking res.ok after fetch, so a 404 page is treated as success.
  • Thinking a const array cannot change; const stops reassignment, not push.

Interview focus: JavaScript topics asked most

JavaScript is the core of front-end and full stack interviews. Expect both theory questions and short output-prediction or coding tasks.

  • var, let and const, hoisting and scope.
  • Closures, this and arrow functions.
  • map, filter and reduce, destructuring, spread and rest.
  • The DOM, event bubbling and event delegation.
  • The event loop, promises and async/await.

Typical questions

  1. What is the difference between var, let and const?
  2. What is the difference between == and ===? What are falsy values?
  3. What is a closure? Give a small example.
  4. Explain map, filter and reduce with examples.
  5. What is event bubbling and event delegation?
  6. Explain the event loop. Why does a promise run before setTimeout?
  7. What are the three states of a promise? How do you handle errors?
  8. Write an async function that fetches data and handles errors.

Answer with a one-line definition, a three or four line code example and the output. Interviewers often change one line of your example and ask what happens, so make sure you understand each line.

A 7-day plan for JavaScript

  1. Day 1: Start with JavaScript, variables and data types.
  2. Day 2: Operators and control flow, functions (including closures).
  3. Day 3: Arrays and objects, ES6 features. Solve five small array problems with map, filter and reduce.
  4. Day 4: The DOM, events. Build the counter and a to-do list with event delegation.
  5. Day 5: Asynchronous JavaScript, promises, async/await. Predict the output of the event loop examples on paper.
  6. Day 6: Fetch API and storage, errors and debugging. Build the weather or user app with loading and error states.
  7. Day 7: answer the 10 practice questions from memory and build one more project from section 14, such as the quiz app.

Keep building one small project every week. Open DevTools while you code and read every error message; it tells you the line number.

Who these notes are for

  • Students who know basic HTML and CSS and want to add interaction.
  • B.Tech, BCA and MCA students with a web technologies or front-end lab.
  • Learners preparing for React, Node.js or a full stack course.
  • Freshers revising JavaScript before front-end, full stack or automation testing interviews.

If you are new to web pages, start with the HTML CSS Notes PDF first. After JavaScript, the React JS Notes PDF is the natural next step.

Download JavaScript Notes PDF

JavaScript Notes PDF: ES6, DOM and Async

The PDF carries the same content as this page in a clean, print-ready layout, so you can read it offline and keep it for revision.

17 pages · 165 KB · PDF · Updated 5 Nov 2026

Download PDF

Sources and further reading

Frequently Asked Questions

What does this JavaScript notes PDF cover?
It covers variables and data types, operators, functions and closures, arrays and objects, ES6 features, the DOM, events, the event loop, promises, async/await, the Fetch API, localStorage and debugging, with 7 projects and 10 practice questions in 17 pages.
Do I need to know HTML and CSS before these notes?
Basic HTML is enough. The notes use small HTML pages for the DOM and event examples, so knowing tags, ids and classes helps. The HTML CSS Notes PDF covers that base.
Do these notes cover ES6 and async JavaScript?
Yes. One section covers ES6 features such as destructuring, spread, optional chaining, classes and modules, and four sections cover the event loop, promises, async/await and the Fetch API.
Are these JavaScript notes free?
Yes. Fill in the short form on this page and the PDF downloads right away. There is no fee for the notes.
Are these notes enough for a JavaScript interview?
They cover the core topics most fresher interviews ask about, with practice questions. Add coding practice on arrays and strings, and build two or three projects you can explain.
Can I print these notes?
Yes. Print them for personal study, write your own examples in the margins and keep the async and array method pages for quick revision.