DEV Community

DEV Community

Adrian

Posted on May 9, 2020

FREE PDF: 50 JavaScript Coding Challenges for Absolute Beginners

Hi Dev.To Community,

I'm sharing a PDF with 50 JavaScript coding challenges (and their solutions). All solutions are presented in classic JavaScript syntax in order to appeal to beginners.

Advanced users can have fun too!

Download link: https://codeguppy.com/site/download/50_coding_challenges.pdf

Happy coding!

Top comments (1)

pic

Templates let you quickly answer FAQs or store snippets for re-use.

pronerainbow profile image

  • Location Sussex, England
  • Education YouTube, Udemy, freecodecamp
  • Work Junior Web Dev at Self employed
  • Joined May 9, 2020

Thanks Adrian!

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink .

Hide child comments as well

For further actions, you may consider blocking this person and/or reporting abuse

dipakahirav profile image

Exploring Next.js 14.3.0-canary.26: A Peek into the Future of SSR Frameworks

Dipak Ahirav - Apr 28

madeelchaudhary profile image

React 19: Unleashing New Frontiers in Web Development

M Adeel - Apr 28

punk-sama profile image

Gustavo H. J. - Apr 28

abhsiksah profile image

Dry running the code to understand the flow

abhsiksah - Apr 27

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Free Javascript challenges

Learn Javascript online by solving coding exercises.

Javascript for all levels

Solve Javascript tasks from beginner to advanced levels.

Accross various subjects

Select your topic of interest and start practicing.

Start your learning path here

Why jschallenger, a hands-on javascript experience.

JSchallenger provides a variety of JavaScript exercises, including coding tasks, coding challenges, lessons, and quizzes.

Structured learning path

JSchallenger provides a structured learning path that gradually increases in complexity. Build your skills and knowledge at your own pace.

Build a learning streak

JSchallenger saves your learning progress. This feature helps to stay motivated and makes it easy for you to pick up where you left off.

Type and execute code yourself

Type real JavaScript and see the output of your code. JSchallenger provides syntax highlighting for easy understanding.

Join 1.000s of users around the world

Most popular challenges, most failed challenges, what users say about jschallenger.

Photography of Mohamed Ibrahim who describes JSchallenger as a very helpful free resource for Javascript exercises

Mohamed Ibrahim

Photography of Tobin Shields who sais that JSchallenger is a great tool with Javascript beginner exercises

Tobin Shields

Photography of Meet Patel who describes JSchallenger as a great place to solve Javascript problems

10+ Free JavaScript Books in PDF for Beginners and Pros

Faraz Logo

By Faraz - January 03, 2024

Unlock the potential of JavaScript with our carefully curated list of 10+ free JavaScript books in PDF for beginners and pros.

10+ Free JavaScript Books in PDF for Beginners and Pros.webp

Table of Contents

  • JavaScript For Impatient Programmers
  • Eloquent JavaScript, 3rd Edition
  • JavaScript Bible, 4th Edition
  • JavaScript Notes for Professionals
  • Coding with JavaScript For Dummies
  • Teach Yourself JavaScript in 24 Hours, Sixth Edition
  • JavaScript: The Definitive Guide, Sixth Edition
  • Head First JavaScript Programming
  • JavaScript A Beginner’s Guide, Third Edition
  • Pro JavaScript Techniques
  • Javascript Enlightenment
  • Modern JavaScript

Frequently Asked Questions (FAQs)

Introduction.

Embarking on a journey into JavaScript? Look no further. This article compiles an extensive guide to 10+ Free JavaScript Books in PDF for Beginners and Pros, ensuring you have the knowledge you need to thrive in the coding realm.

Why Choose JavaScript Books in PDF?

In a world dominated by digital content, PDF books offer unparalleled convenience and accessibility. The ability to download and access learning materials offline is a game-changer, enabling users to learn at their own pace, anytime and anywhere.

1. JavaScript For Impatient Programmers

JavaScript For Impatient Programmers

JavaScript for Impatient Programmers" by Dr. Axel Rauschmayer is a dynamic and comprehensive guide tailored for both beginners and seasoned developers looking to master JavaScript efficiently. Dr. Rauschmayer's expertise shines through as he distills complex concepts into concise and actionable insights, making this book an invaluable resource for those eager to accelerate their JavaScript proficiency. Packed with practical examples and real-world scenarios, this free PDF book is a must-read for programmers seeking a quick and effective path to JavaScript mastery.

2. Eloquent JavaScript, 3rd Edition

Eloquent JavaScript, 3rd Edition

"Eloquent JavaScript, 3rd Edition" by Marijn Haverbeke is a definitive resource that transcends traditional programming guides, offering an immersive journey into the world of JavaScript. Geared for both beginners and seasoned developers, this book weaves together a captivating narrative with hands-on exercises to cultivate a deep understanding of JavaScript's intricacies. Haverbeke's eloquent prose and insightful examples make complex concepts accessible, empowering readers to write elegant and efficient code. This free PDF book stands as a cornerstone for anyone looking to not just learn JavaScript but to truly master the language with clarity and sophistication.

3. JavaScript Bible, 4th Edition

JavaScript Bible, 4th Edition

The "JavaScript Bible, 4th Edition" by Danny Goodman stands as a comprehensive and timeless guide for developers delving into the intricacies of JavaScript. With a wealth of practical insights and in-depth explanations, Goodman provides a thorough exploration of the language's features and capabilities. This edition, like its predecessors, serves as an essential reference for both beginners and experienced programmers seeking a solid understanding of JavaScript's nuances. From fundamental concepts to advanced techniques, Goodman's adept coverage ensures that readers gain a robust foundation in JavaScript, making this free PDF book a valuable asset in any developer's toolkit.

4. JavaScript Notes for Professionals

JavaScript Notes for Professionals

"JavaScript Notes for Professionals" by GoalKicker.com is a concise and practical resource that caters to the needs of both beginners and seasoned developers. This book condenses essential JavaScript concepts into a well-organized format, providing quick reference notes and valuable insights. Whether you're looking to reinforce your foundational knowledge or dive into advanced topics, this free PDF resource serves as a handy companion for mastering JavaScript.

5. Coding with JavaScript For Dummies

Coding with JavaScript For Dummies

"Coding with JavaScript For Dummies" by Chris Minnick and Eva Holland is a user-friendly and accessible guide designed to demystify JavaScript for learners of all levels. With a focus on simplicity and hands-on learning, this book equips readers with the fundamental skills needed to code effectively in JavaScript. Minnick and Holland break down complex concepts into digestible lessons, providing practical examples and exercises that empower readers to build their coding proficiency. Whether you're a beginner looking to grasp the basics or an aspiring developer seeking to expand your skill set, this resourceful book, available in a free PDF format, makes the world of JavaScript programming approachable and enjoyable.

6. Teach Yourself JavaScript in 24 Hours, Sixth Edition

Teach Yourself JavaScript in 24 Hours, Sixth Edition

"Teach Yourself JavaScript in 24 Hours, Sixth Edition" by Phil Ballard is a comprehensive and user-friendly guide designed for individuals eager to quickly acquire JavaScript proficiency. In this edition, Phil Ballard skillfully breaks down the complexities of JavaScript into manageable lessons, allowing readers to grasp key concepts and build practical skills within a 24-hour timeframe. The book employs a hands-on approach, providing real-world examples and exercises that reinforce learning and facilitate rapid progress. Whether you're a beginner or an experienced programmer, this resource, available in a free PDF format, serves as a valuable tool for mastering JavaScript efficiently and effectively in a short period.

7. JavaScript: The Definitive Guide, Sixth Edition

JavaScript: The Definitive Guide, Sixth Edition

"JavaScript: The Definitive Guide, Sixth Edition" by David Flanagan is an authoritative and comprehensive resource for developers seeking an in-depth understanding of JavaScript. With meticulous attention to detail, Flanagan covers the language's core features, providing a thorough exploration of its capabilities and best practices. This edition, like its predecessors, serves as an essential reference for both beginners and seasoned programmers, offering insights into the language's nuances and advanced features. Whether you are looking to master JavaScript for web development or gain expertise in client-side scripting, this free PDF book stands as an indispensable guide, empowering readers with the knowledge needed to write efficient and sophisticated JavaScript code.

8. Head First JavaScript Programming

Head First JavaScript Programming

"Head First JavaScript Programming" by Eric T. Freeman and Elisabeth Robson is an engaging and learner-friendly guide that takes a unique approach to teaching JavaScript. Focused on providing a brain-friendly and visually rich learning experience, the book employs a variety of interactive techniques, puzzles, and real-world examples to reinforce key concepts. Freeman and Robson leverage their expertise to make JavaScript accessible to beginners, covering fundamental principles, best practices, and practical applications. This resource, available in a free PDF format, is an excellent choice for those looking to dive into JavaScript programming with a hands-on and entertaining approach, making the learning journey both effective and enjoyable.

9. JavaScript A Beginner’s Guide, Third Edition

JavaScript A Beginner’s Guide, Third Edition

"JavaScript: A Beginner’s Guide, Third Edition" by John Pollock is an excellent resource tailored for individuals new to JavaScript programming. Pollock guides readers through the foundational concepts of JavaScript in a clear and accessible manner, making it an ideal starting point for beginners. The book covers key topics such as syntax, data types, functions, and DOM manipulation, providing practical examples and exercises to reinforce learning. With a focus on hands-on experience, this third edition ensures that readers develop a solid understanding of JavaScript and gain confidence in their coding skills. Whether you are a novice programmer or transitioning from another language, this free PDF book serves as a valuable companion for building a strong foundation in JavaScript.

10. Pro JavaScript Techniques

Pro JavaScript Techniques

"Pro JavaScript Techniques" by John Resig is a comprehensive guide that delves into advanced and sophisticated techniques for JavaScript development. Authored by the creator of the popular JavaScript library jQuery, Resig's expertise shines through as he explores cutting-edge approaches, best practices, and optimization strategies. This book is tailored for experienced developers looking to elevate their JavaScript skills and create more efficient and maintainable code. By combining theoretical insights with practical examples, Resig empowers readers to tackle complex projects and challenges in the JavaScript ecosystem. Available in a free PDF format, "Pro JavaScript Techniques" is a valuable resource for those seeking to master the intricacies of advanced JavaScript programming.

11. Javascript Enlightenment

Javascript Enlightenment

"JavaScript Enlightenment" by Cody Lindley is an enlightening and in-depth exploration of JavaScript, designed to deepen the understanding of the language for developers at various levels. Lindley's approach goes beyond the basics, offering readers a profound insight into the language's inner workings and best practices. This book is particularly beneficial for developers aiming to enhance their problem-solving skills and gain a more profound understanding of JavaScript's core concepts. With a focus on clarity and practical examples, "JavaScript Enlightenment" serves as a valuable resource, providing a solid foundation for developers to write more effective and maintainable code. Whether you are a beginner or an experienced coder, this free PDF book is a valuable asset for those looking to elevate their JavaScript skills.

12. Modern JavaScript

Modern JavaScript

"Modern JavaScript" by Larry Ullman is a contemporary guide that navigates through the latest features and best practices in the JavaScript language. Ullman's expertise is evident as he covers key concepts, modern techniques, and tools that are essential for today's JavaScript developers. This book is well-suited for both beginners looking to grasp the fundamentals and experienced developers aiming to stay current with the ever-evolving JavaScript landscape. With a practical and hands-on approach, Ullman ensures that readers not only understand the syntax but also gain insights into real-world application scenarios. Whether you're building web applications or enhancing your coding skills, "Modern JavaScript," available in a free PDF format, serves as a valuable resource for navigating the intricacies of contemporary JavaScript development.

In the ever-evolving world of web development, quality learning resources are indispensable. The curated list of JavaScript books, both in PDF and online, caters to a diverse audience, ensuring that learners at every level find valuable insights to enhance their JavaScript journey.

Q1. Are these books suitable for absolute beginners?

A1. Absolutely! The recommended books cater to both beginners and professionals, providing a gradual learning curve.

Q2. Can I access "Eloquent JavaScript" for free online?

A2. Yes, "Eloquent JavaScript" is available for free on its official website.

Q3. How often should I practice to become proficient in JavaScript?

A3. Consistency is key. Aim for regular practice sessions to reinforce your understanding and improve your coding skills.

Q4. Are online resources as effective as PDF books for learning JavaScript?

A4. It depends on your learning preferences. PDFs offer offline access, while online resources provide dynamic updates. Choose based on your convenience and preferences.

Q5. Where can I get further assistance or join the JavaScript community?

A5. Explore forums like Stack Overflow, join JavaScript-related groups on social media, and attend local meetups to connect with the vibrant JavaScript community.

dynamic-field.png

That’s a wrap!

I hope you enjoyed this article

Did you like it? Let me know in the comments below 🔥 and you can support me by buying me a coffee.

And don’t forget to sign up to our email newsletter so you can get useful content like this sent right to your inbox!

Thanks! Faraz 😊

Subscribe to my Newsletter

Get the latest posts delivered right to your inbox, latest post.

Build Your Own Nixie Tube Clock using HTML, CSS, and JavaScript (Source Code)

Build Your Own Nixie Tube Clock using HTML, CSS, and JavaScript (Source Code)

Learn how to create a stunning Nixie Tube Clock using HTML, CSS, and JavaScript. Get the source code and step-by-step instructions today!

Create a Responsive Popup Contact Form: HTML, CSS, JavaScript Tutorial

Create a Responsive Popup Contact Form: HTML, CSS, JavaScript Tutorial

April 17, 2024

Create a Responsive Customer Review Using HTML and CSS

Create a Responsive Customer Review Using HTML and CSS

April 14, 2024

Create a URL Shortening Landing Page using HTML, CSS, and JavaScript

Create a URL Shortening Landing Page using HTML, CSS, and JavaScript

April 08, 2024

Develop Responsive Admin Dashboard with HTML, Materialize CSS, and JavaScript

Develop Responsive Admin Dashboard with HTML, Materialize CSS, and JavaScript

April 05, 2024

How to Create a Scroll Down Button: HTML, CSS, JavaScript Tutorial

How to Create a Scroll Down Button: HTML, CSS, JavaScript Tutorial

Learn to add a sleek scroll down button to your website using HTML, CSS, and JavaScript. Step-by-step guide with code examples.

How to Create a Trending Animated Button Using HTML and CSS

How to Create a Trending Animated Button Using HTML and CSS

March 15, 2024

Create Interactive Booking Button with mask-image using HTML and CSS (Source Code)

Create Interactive Booking Button with mask-image using HTML and CSS (Source Code)

March 10, 2024

Create Shimmering Effect Button: HTML & CSS Tutorial (Source Code)

Create Shimmering Effect Button: HTML & CSS Tutorial (Source Code)

March 07, 2024

How to Create a Liquid Button with HTML, CSS, and JavaScript (Source Code)

How to Create a Liquid Button with HTML, CSS, and JavaScript (Source Code)

March 01, 2024

Build a Number Guessing Game using HTML, CSS, and JavaScript | Source Code

Build a Number Guessing Game using HTML, CSS, and JavaScript | Source Code

Learn how to create an interactive Number Guessing Game from scratch using HTML, CSS, and JavaScript with this beginner-friendly tutorial.

Building a Fruit Slicer Game with HTML, CSS, and JavaScript (Source Code)

Building a Fruit Slicer Game with HTML, CSS, and JavaScript (Source Code)

December 25, 2023

Create Connect Four Game Using HTML, CSS, and JavaScript (Source Code)

Create Connect Four Game Using HTML, CSS, and JavaScript (Source Code)

December 07, 2023

Creating a Candy Crush Clone: HTML, CSS, and JavaScript Tutorial (Source Code)

Creating a Candy Crush Clone: HTML, CSS, and JavaScript Tutorial (Source Code)

November 17, 2023

Sudoku Solver with HTML, CSS, and JavaScript

Sudoku Solver with HTML, CSS, and JavaScript

October 16, 2023

Create Image Color Extractor Tool using HTML, CSS, JavaScript, and Vibrant.js

Create Image Color Extractor Tool using HTML, CSS, JavaScript, and Vibrant.js

Master the art of color picking with Vibrant.js. This tutorial guides you through building a custom color extractor tool using HTML, CSS, and JavaScript.

Build a Responsive Screen Distance Measure with HTML, CSS, and JavaScript

Build a Responsive Screen Distance Measure with HTML, CSS, and JavaScript

January 04, 2024

Crafting Custom Alarm and Clock Interfaces using HTML, CSS, and JavaScript

Crafting Custom Alarm and Clock Interfaces using HTML, CSS, and JavaScript

November 30, 2023

Detect User's Browser, Screen Resolution, OS, and More with JavaScript using UAParser.js Library

Detect User's Browser, Screen Resolution, OS, and More with JavaScript using UAParser.js Library

October 30, 2023

URL Keeper with HTML, CSS, and JavaScript (Source Code)

URL Keeper with HTML, CSS, and JavaScript (Source Code)

October 26, 2023

Creating a Responsive Footer with Tailwind CSS (Source Code)

Creating a Responsive Footer with Tailwind CSS (Source Code)

Learn how to design a modern footer for your website using Tailwind CSS with our detailed tutorial. Perfect for beginners in web development.

Crafting a Responsive HTML and CSS Footer (Source Code)

Crafting a Responsive HTML and CSS Footer (Source Code)

November 11, 2023

Create an Animated Footer with HTML and CSS (Source Code)

Create an Animated Footer with HTML and CSS (Source Code)

October 17, 2023

Bootstrap Footer Template for Every Website Style

Bootstrap Footer Template for Every Website Style

March 08, 2023

How to Create a Responsive Footer for Your Website with Bootstrap 5

How to Create a Responsive Footer for Your Website with Bootstrap 5

August 19, 2022

javascript problem solving pdf

JavaScript Recipes

A Problem-Solution Approach

  • © 2017
  • Russ Ferguson 0 ,
  • Keith Cirkel 1

You can also search for this author in PubMed   Google Scholar

Woking, Surrey, United Kingdom

  • Right up-to-date with the latest version of JavaScript
  • Includes recipes for using frameworks and Node.js as well as the main JavaScript recipes
  • Shows how applications can function more efficiently and features different aspects of frameworks such as jQuery

77k Accesses

1 Citations

This is a preview of subscription content, log in via an institution to check access.

Access this book

  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Other ways to access

Licence this eBook for your library

Institutional subscriptions

Table of contents (21 chapters)

Front matter, working with javascript datatypes.

  • Russ Ferguson, Keith Cirkel

Working with Expressions

Working with strings, working with numbers and math, working with bitwise operations against 32-bit integers, dates and times, working with arrays, working with arrays in loops, working with objects, working with sets, working with maps, working with functions, working with generators, working with template literals, working with symbols, working with proxies, working with classes, working with events, debugging and handling exceptions.

  • Apress recipes
  • functional programming
  • methods and promises

About this book

Quickly discover solutions to common problems, best practices you can follow, and everything JavaScript has to offer. Using a problem-solution approach, this book takes you from language basics like built-in objects and flow control all the way to advanced optimization techniques, frameworks and Node.js. 

With  JavaScript Recipes  you will learn language fundamentals like types, conversions, execution contexts, expressions, operators, statements, and built-in objects. You'll explore and make the most of your script’s host environment and how to create your own JavaScript host using Google’s V8 engine. Employ advanced optimization techniques to create scripts that execute as fast, or faster, than native executables.

JavaScript Recipes  shows you how to avoid wasting development time and concentrate on developing cutting-edge applications. You’ll see how much quicker and efficient it is to develop with JavaScript. Start becominga JavaScript pro with  JavaScript Recipes  today.

  • Learn JavaScript language fundamentals and what they can do for you
  • Use JavaScript’s powerful features to develop next-generation applications
  • Explore your script’s host environment and extend it with your own objects
  • Learn how to use Google’s V8 Engine to create your own JavaScript environment
  • Learn advanced optimization techniques
  • Implement advanced techniques like closures, namespaces, and reflection
  • How to use Node.js efficiently 

Authors and Affiliations

Russ Ferguson

Keith Cirkel

About the authors

Bibliographic information.

Book Title : JavaScript Recipes

Book Subtitle : A Problem-Solution Approach

Authors : Russ Ferguson, Keith Cirkel

DOI : https://doi.org/10.1007/978-1-4302-6107-0

Publisher : Apress Berkeley, CA

eBook Packages : Professional and Applied Computing , Apress Access Books , Professional and Applied Computing (R0)

Copyright Information : Russ Ferguson and Keith Cirkel 2017

Softcover ISBN : 978-1-4302-6106-3 Published: 23 December 2016

eBook ISBN : 978-1-4302-6107-0 Published: 22 December 2016

Edition Number : 1

Number of Pages : LIX, 347

Number of Illustrations : 1 b/w illustrations, 42 illustrations in colour

Topics : Web Development , Computer Science, general

  • Publish with us

Policies and ethics

  • Find a journal
  • Track your research
  • Skip to main content
  • Skip to search
  • Skip to select language
  • Sign up for free
  • Português (do Brasil)

Solve common problems in your JavaScript code

The following links point to solutions to common problems you may encounter when writing JavaScript.

Common beginner's mistakes

Correct spelling and casing.

If your code doesn't work and/or the browser complains that something is undefined, check that you've spelt all your variable names, function names, etc. correctly.

Some common built-in browser functions that cause problems are:

Semicolon position

You need to make sure you don't place any semicolons incorrectly. For example:

There are a number of things that can go wrong with functions.

One of the most common errors is to declare the function, but not call it anywhere. For example:

This code won't do anything unless you call it with the following statement:

Function scope

Remember that functions have their own scope — you can't access a variable value set inside a function from outside the function, unless you declared the variable globally (i.e. not inside any functions), or return the value from the function.

Running code after a return statement

Remember also that when you return from a function, the JavaScript interpreter exits the function — no code after the return statement will run.

In fact, some browsers (like Firefox) will give you an error message in the developer console if you have code after a return statement. Firefox gives you "unreachable code after return statement".

Object notation versus normal assignment

When you assign something normally in JavaScript, you use a single equals sign, e.g.:

With Objects , however, you need to take care to use the correct syntax. The object must be surrounded by curly braces, member names must be separated from their values using colons, and members must be separated by commas. For example:

Basic definitions

  • What is JavaScript?
  • What is a variable?
  • What are strings?
  • What is an array?
  • What is a loop?
  • What is a function?
  • What is an event?
  • What is an object?
  • What is JSON?
  • What is a web API?
  • What is the DOM?

Basic use cases

  • How do you add JavaScript to your page?
  • How do you add comments to JavaScript code?
  • How do you declare a variable?
  • How do you initialize a variable with a value?
  • How do you update a variable's value? (also see Assignment operators )
  • What data types can values have in JavaScript?
  • What does 'loosely typed' mean?
  • What types of number do you have to deal with in web development?
  • How do you do basic math in JavaScript?
  • What is operator precedence, and how is it handled in JavaScript?
  • How do you increment and decrement values in JavaScript?
  • How do you compare values in JavaScript? (e.g. to see which one is bigger, or to see if one value is equal to another).
  • How do you create a string in JavaScript?
  • Do you have to use single quotes or double quotes?
  • How do you escape characters in strings?
  • How do you join strings together?
  • Can you join strings and numbers together?
  • How do you find the length of a string?
  • How do you find what character is at a certain position in a string?
  • How do you find and extract a specific substring from a string?
  • How do you change the case of a string?
  • How do you replace one specific substring with another?
  • How do you create an array?
  • How do you access and modify the items in an array? (this includes multidimensional arrays)
  • How do you find the length of an array?
  • How do you add items to an array?
  • How do you remove items from an array?
  • How do you split a string into array items, or join array items into a string?

Debugging JavaScript

  • What are the basic types of error?
  • What are browser developer tools, and how do you access them?
  • How do you log a value to the JavaScript console?
  • How do you use breakpoints and other JavaScript debugging features?

For more information on JavaScript debugging, see Handling common JavaScript problems . Also, see Other common errors for a description of common errors.

Making decisions in code

  • How do you execute different blocks of code, depending on a variable's value or other condition?
  • How do you use if ...else statements?
  • How do you nest one decision block inside another?
  • How do you use AND, OR, and NOT operators in JavaScript?
  • How do you conveniently handle a large number of choices for one condition?
  • How do you use a ternary operator to make a quick choice between two options based on a true or false test?

Looping/iteration

  • How do you run the same bit of code over and over again?
  • How do you exit a loop before the end if a certain condition is met?
  • How do you skip to the next iteration of a loop if a certain condition is met?
  • How do you use while and do...while loops?

Intermediate use cases

  • How do you find functions in the browser?
  • What is the difference between a function and a method?
  • How do you create your own functions?
  • How do you run (call, or invoke) a function?
  • What is an anonymous function?
  • How do you specify parameters (or arguments) when invoking a function?
  • What is function scope?
  • What are return values, and how do you use them?
  • How do you create an object?
  • What is dot notation?
  • What is bracket notation?
  • How do you get and set the methods and properties of an object?
  • What is this , in the context of an object?
  • What is object-oriented programming?
  • What are constructors and instances, and how do you create them?
  • What different ways are there to create objects in JavaScript?
  • How do you structure JSON data, and read it from JavaScript?
  • How can you load a JSON file into a page?
  • How do you convert a JSON object to a text string, and back again?
  • What are event handlers and how do you use them?
  • What are inline event handlers?
  • What does the addEventListener() function do, and how do you use it?
  • Which mechanism should I use to add event code to my web pages?
  • What are event objects, and how do you use them?
  • How do you prevent default event behavior?
  • How do events fire on nested elements? (event propagation, also related — event bubbling and capturing)
  • What is event delegation, and how does it work?

Object-oriented JavaScript

  • What are object prototypes?
  • What is the constructor property, and how can you use it?
  • How do you add methods to the constructor?
  • How do you create a new constructor that inherits its members from a parent constructor?
  • When should you use inheritance in JavaScript?
  • How do you manipulate the DOM (e.g. adding or removing elements) using JavaScript?

70 Free JavaScript Books

B est free JavaScript books : ECMAScript, jQuery, and other. Download ebooks (pdf, mobi, epub) and read online . Update of December 2017 collection. 6 new books.

JavaScript, often abbreviated as JS, is a high-level, dynamic, weakly typed, prototype-based, multi-paradigm, and interpreted programming language.

Table of Contents:

Javascript books, jquery books, other books, ecmascript books.

Cover Image: Practical ES6

Practical ES6

Ideal for professional software developers with a basic understanding of JavaScript, this practical book shows you how to build small, interconnected ES6 JavaScript modules that emphasize reusability. You’ll learn how to face a project with a modular mindset, and how to organize your applications into simple pieces that work well in isolation and can be combined to create a large, robust application. This book focuses on two aspects of JavaScript development: modularity and ES6 features. You’ll learn how to tackle application development by following a scale-out approach. As pieces of your codebase grow too big, you can break them up into smaller modules. Author: Nicolas Bevacqua Date: 2017

Cover Image: Understanding ECMAScript 6

Understanding ECMAScript 6

ECMAScript 6 is coming, are you ready? There's a lot of new concepts to learn and understand. Get a headstart with this book! Author: Nicholas C. Zakas Date: 2017

Cover Image: Exploring ES2016 and ES2017

Exploring ES2016 and ES2017

This book covers the latest versions of JavaScript as they are created. Author: Axel Rauschmayer Date: 2016

Cover Image: Exploring ES6

Exploring ES6

An in-depth book on ECMAScript 6, for JavaScript programmers. Author: Axel Rauschmayer Date: 2016

Cover Image: ECMAScript 6 Succinctly

ECMAScript 6 Succinctly

ECMAScript 6 (ES6), also known as ECMAScript 2015, brings new functionality and features to the table that developers have been wanting for a long time. The wait is over, and with help from ECMAScript 6 Succinctly by Matthew Duffield, you can now develop all of these features. You can also target browsers that don’t even support ES6 yet using a transpiler. A compiler translates one language to another, such as C# to MSIL, while a transpiler converts one version of a language to another, such as ES6 to ES5. Author: Matthew Duffield Date: 2016

Book image: JavaScript Notes For Professionals

  • Goalkicker.com

Release date

About the book, javascript notes for professionals.

The JavaScript® Notes for Professionals book is compiled from Stack Overflow Documentation, the content is written by the beautiful people at Stack Overflow. Text content is released under Creative Commons BY-SA. See credits at the end of this book whom contributed to the various chapters. Images may be copyright of their respective owners unless otherwise specified. Book created for educational purposes and is not affiliated with JavaScript® group(s), company(s) nor Stack Overflow. All trademarks belong to their respective company owners. 490 pages.

Book image: The JavaScript Way. A modern introduction to an essential language.

  • Baptiste Pesquet
  • read online

The JavaScript Way. A modern introduction to an essential language.

JavaScript is a great entry point into the world of programming, and required knowledge for an ever increasing number of software professionals. Complete beginner or already experienced in other programming languages, what better time than now to discover the JavaScript Way ?

Cover book: Practical Modern JavaScript

  • Nicolás Bevacqua

Release Date

Practical modern javascript.

Ideal for professional software developers with a basic understanding of JavaScript, this practical book shows you how to build small, interconnected ES6 JavaScript modules that emphasize reusability. You’ll learn how to face a project with a modular mindset, and how to organize your applications into simple pieces that work well in isolation and can be combined to create a large, robust application. This book focuses on two aspects of JavaScript development: modularity and ES6 features. You’ll learn how to tackle application development by following a scale-out approach. As pieces of your codebase grow too big, you can break them up into smaller modules.

Book image: JavaScript Functions, Closures, and Prototypes

  • Amin Meyghani

JavaScript Functions, Closures, and Prototypes

This is a short book that walks you through the fundamentals of functions, closures, and prototypes . Understanding these three core concepts are key in learning JavaScript . Now that JavaScript is becoming more important than ever, it is crucial to have a good understanding of the fundamental concepts.

Cover book: Build Pacman

  • Jeffrey Biles

Build Pacman

Learn modern Javascript, HTML5 Canvas, and a bit of EmberJS. This is a book about surviving an alien invasion and using web technologies.

Cover Image: What You Need To Know About JavaScript

What You Need To Know About JavaScript

Discover everything a beginner needs to know about the world of JavaScript with this free eBook. From the absolute basics of JS syntax to combining ECMAScript 6 and Visual Studio Code this primer is the perfect resource for a JavaScript Master-in-the-Making! Author: Gabriel A. Canepa Date: 2016

Cover Image: Designing Scalable JavaScript Applications

Designing Scalable JavaScript Applications

Author: Emmit Scott Date: 2016

Cover Image: JavaScript Allongé, The Six Edition

JavaScript Allongé, The "Six" Edition

A long pull of functions, combinators, & decorators, updated to include the latest ES-6 features. Author: Reg Braithwaite Date: 2016

Cover book: Learn Javascript

Learn Javascript

This book will teach you the basics of programming and Javascript. Whether you are an experienced programmer or not, this book is intended for everyone who wishes to learn the JavaScript programming language.

Cover Image: You Don't Know JS (Book Series)

You Don't Know JS (Book Series)

This is a series of books diving deep into the core mechanisms of the JavaScript language. The first edition of the series is now complete. Author: Kyle Simpson Date: 2013-2016

Cover book: JavaScript: Novice To Ninja

  • Darren Jones

JavaScript: Novice To Ninja

JavaScript has become a must-have skill for all web developers. JavaScript: Novice to Ninja is a fun, practical, and comprehensive guide to the modern usage of this deceptively powerful language. In this step-by-step introduction to coding in JavaScript you’ll learn how to solve real-world problems, track events, design eye-catching animations, build smarter forms, and develop richer applications. Along the way, you’ll learn to develop according to best practices, including Object Oriented Programming and Test Driven Development.

Cover book: JS MythBusters

JS MythBusters

A JavaScript optimization handbook from a high level point of view.

Cover Image: Mastering JavaScript High Performance

Mastering JavaScript High Performance

Master the art of building, deploying, and optimizing faster web applications with JavaScript. Author: Chad R. Adams Date: 2015

Cover Image: Building Front-End Web Apps With Plain JavaScript

Building Front-End Web Apps With Plain JavaScript

An incremental in-depth tutorial about building front-end web applications with plain JavaScript, not using any third-party library or framework, for theory-underpinned and example-based learning by doing it yourself. Author: Gerd Wagner Date: 2015

Cover Image: Learning JavaScript Design Patterns

Learning JavaScript Design Patterns

With Learning JavaScript Design Patterns, you’ll learn how to write beautiful, structured, and maintainable JavaScript by applying classical and modern design patterns to the language. If you want to keep your code efficient, more manageable, and up-to-date with the latest best practices, this book is for you. Author: Addy Osmani Date: 2015

Book image: Javascript Challenges

  • Tomás Corral Casas

Javascript Challenges

This book will challenge you to learn and understand the most obscure and tricky parts of Javascript.

Cover book: JavaScript Plus A Dash Of JQuery

  • Nicholas Johnson

JavaScript Plus A Dash Of JQuery

A sensible introduction to coding with JavaScript.

Cover Image: Eloquent JavaScript

Eloquent JavaScript

JavaScript lies at the heart of almost every modern web application, from social apps to the newest browser-based games. Though simple for beginners to pick up and play with, JavaScript is a flexible, complex language that you can use to build full-scale applications. Author: Marijn Haverbeke Date: 2014

Cover Image: Thinking In JavaScript

Thinking In JavaScript

Get started with JavaScript with this free eBook and learn one of the most important languages in web development today. With helpful tips and code examples, discover how you can create websites with impressive and dynamic functionality. Explore JavaScript’s in-built features and find out how to customize them in this accessible and free guide. Author: Aravind Shenoy Date: 2014

Cover Image: Speaking JavaScript

Speaking JavaScript

Like it or not, JavaScript is everywhere these days—from browser to server to mobile—and now you, too, need to learn the language or dive deeper than you have. This concise book guides you into and through JavaScript, written by a veteran programmer who once found himself in the same position. Author: Axel Rauschmayer Date: 2014

Cover Image: Programming JavaScript Applications

Programming JavaScript Applications

Take advantage of JavaScript’s power to build robust web-scale or enterprise applications that are easy to extend and maintain. By applying the design patterns outlined in this practical book, experienced JavaScript developers will learn how to write flexible and resilient code that’s easier—yes, easier—to work with as your code base grows. Author: Eric Elliott Date: 2014

Cover Image: JavaScript Succinctly

JavaScript Succinctly

JavaScript Succinctly was written to give readers an accurate, concise examination of JavaScript objects and their supporting nuances, such as complex values, primitive values, scope, inheritance, the head object, and more. If you’re an intermediate JavaScript developer and want to solidify your understanding of the language, or if you’ve only used JavaScript beneath the mantle of libraries such as jQuery or Prototype, this is the book for you. Author: Cody Lindley Date: 2014

Cover book: Object-oriented JavaScript - Second Edition

  • Stoyan Stefanov
  • Kumar Chetan Sharma

Object-oriented JavaScript - Second Edition

As applications move from the desktop to the browser, the need to learn well-structured JavaScript is vital. This book is for developers who want to learn JavaScript from scratch, or take their JavaScript skills to a new level of sophistication. A completely free and full-length introduction to objects in JavaScript, it teaches through examples and practical play.

Cover Image: JavaScript For Cats

JavaScript For Cats

An introduction for new programmers. Date: 2013

Cover Image: Human JavaScript

Human JavaScript

Introducing Human JavaScript: Practical patterns for simple but powerful JavaScript apps. Author: Henrik Joreteg Date: 2013

Cover Image: JavaScript In Ten Minutes

JavaScript In Ten Minutes

JavaScript in ten (arbitrarily long) minutes. Author: Spencer Tipping Date: 2013

Cover book: HTML5 Graphing And Data Visualization Cookbook

HTML5 Graphing And Data Visualization Cookbook

This cookbook is organized in a linear, progressive way allowing it to be read from start to finish, as well as to be used as a useful resource for specific tasks. The HTML5 examples and recipes will have you making dynamic, interactive, and animated charts and graphs in no time. You don't need to have a background in HTML5 or Canvas but you do need to have a basic understanding of how HTML works and know how to code in any language (preferably in JavaScript). In this book we will not explain how to learn to code but how to create projects and how to plan and execute them in the process.

Cover Image: JavaScript Enlightenment

JavaScript Enlightenment

If you’re an advanced beginner or intermediate JavaScript developer, JavaScript Enlightenment will solidify your understanding of the language—especially if you use a JavaScript library. In this concise book, JavaScript expert Cody Lindley (jQuery Cookbook) provides an accurate view of the language by examining its objects and supporting nuances. Libraries and frameworks help you build web applications quickly and efficiently, but when things go wrong or performance becomes an issue, knowing how and why they work is critical. If you’re ready to go under the hood and get your hands dirty with JavaScript internals, this is your book. Author: Cody Lindley Date: 2012

Cover Image: Master Space And Time With JavaScript

Master Space And Time With JavaScript

Master Space and Time With JavaScript is a four book series that will help you come to to grips with modern JavaScript, including the JavaScript object model, testing, Backbone, and Ember. Author: Noel Rappin Date: 2012

Cover Image: JavaScript Cookbook

JavaScript Cookbook

Enjoy this complimentary excerpt from JavaScript Cookbook featuring interactive examples that illustrate how to use JavaScript to manipulate strings, arrays, and graphics. Author: Shelley Powers Date: 2010

Book image: jQuery Notes for Professionals

jQuery Notes for Professionals

The jQuery Notes for Professionals book is compiled from Stack Overflow Documentation, the content is written by the beautiful people at Stack Overflow. Text content is released under Creative Commons BY-SA. See credits at the end of this book whom contributed to the various chapters. Images may be copyright of their respective owners unless otherwise specified. Book created for educational purposes and is not affiliated with jQuery® group(s), company(s) nor Stack Overflow. All trademarks belong to their respective company owners. 67 pages.

Cover book: Jquery Learning Center

Jquery Learning Center

Up-to-date compilation of the official documentation pages, hosted on https://github.com/jquery/learn.jquery.com . Updated regularly for you to have the latest version.

Cover book: JQuery. Step by Logical Step

JQuery. Step By Logical Step

JQuery is a library written in JavaScript which is primarily about DOM manipulation. It lets you find parts of a web page and make changes to them with very little code. It's wildly popular and is used extensively across the Internet. It also forms the basis of other larger frameworks. If you're serious about web development you need to know jQuery.

Cover Image: jQuery Succinctly

jQuery Succinctly

jQuery Succinctly was written to express, in short-order, the concepts essential to intermediate and advanced jQuery development. Its purpose is to instill in you, the reader, practices that jQuery developers take as common knowledge. Each chapter contains concepts essential to becoming a seasoned jQuery developer. This book is intended for two types of readers. The first is someone who has read introductory material on jQuery and is looking for the next logical step. The second type of reader is a JavaScript developer, already versed in another library, now trying to quickly learn jQuery. I crafted this book to be used as my own personal reference point for jQuery concepts. This is exactly the type of book I wish every JavaScript library had available. Author: Cody Lindley Date: 2014

Cover book: jQuery Trickshots

  • Tutorialzine

jQuery Trickshots

In this book, you will find 100 advanced jQuery techniques that we have developed over the years as JavaScript programmers and authors for Tutorialzine, presented as easy to understand tips. If you are an experienced jQuery developer, or a beginner just starting out with JavaScript, this book is for you. You will learn neat tricks, find out about awesome plugins, and discover how to use (and abuse) our favorite library to your advantage.

Cover Image: jQuery Enlightenment

jQuery Enlightenment

"jQuery Enlightenment was written to express, in short-order, the concepts essential to intermediate and advanced jQuery development. Its purpose is to instill in you, the reader, practices that jQuery developers take as common knowledge. Each chapter contains concepts essential to becoming a seasoned jQuery developer. This book is intended for three types of readers. The first is someone who has read introductory books on jQuery and is looking for the next logical step. The second type of reader is a JavaScript developer, already versed in another library, now trying to quickly learn jQuery. The third reader is myself, the author. I crafted this book to be used as my own personal reference point for jQuery concepts. This is exactly the type of book I wish every JavaScript library had available." Author: Cody Lindley Date: 2009

Cover book: Nodebots - Javascript And Robotic In The Real World

  • Will Mendes

Nodebots - Javascript And Robotic In The Real World

Do you want to know how to use Javascript to read sensors and create powerful applications with Nodebots? Do you want to learn how to create performance tests and good architecture practices for complex applications? So this book is for you!

Cover book: Bing Maps V8 Succinctly

  • James McCaffrey

Bing Maps V8 Succinctly

At least 80% of all information being collected by enterprises includes geolocation data. The Bing Maps V8 library is a very large collection of JavaScript code that allows web developers to place a map on a webpage, query for data, and manipulate objects on a map, creating a geo-application. In Bing Maps V8 Succinctly, James McCaffrey takes readers through utilizing this library, from creating the simplest application that uses it, to mastering more advanced functions like creating color-gradient legends and custom-styled Infobox objects.

Cover book: D3 Tips and Tricks v4.x

  • Malcolm Maclean

D3 Tips and Tricks v4.x

Tips and tricks for using d3.js (version 4), one of the leading data visualization tools for the web. It's aimed at getting you started and moving you forward. You can download for FREE or donate to encourage further development if you wish :-).

Cover Image: CoffeeScript Cookbook

CoffeeScript Cookbook

CoffeeScript recipes for the community by the community. Date: 2017

Cover Image: D3 Tips And Tricks

D3 Tips And Tricks

Over 600 pages of tips and tricks for using d3.js, one of the leading data visualization tools for the web. It's aimed at getting you started and moving you forward. Includes over 50 downloadable code examples. Author: Malcolm Maclean Date: 2017

Cover book: TypeScript Deep Dive

  • Basarat Ali Syed

TypeScript Deep Dive

The definitive guide to TypeScript. Dive into all the details that a JavaScript developer needs to know to be a great TypeScript developer.

Cover book: Essential TypeScript

  • Jess Chadwick

Essential TypeScript

JavaScript is the defacto language of the world, but its dynamic nature can often get you in trouble. Static typing helps avoid a bunch of mistakes that are easy to make when using a dynamic language. TypeScript is JavaScript, only better. These days, TypeScript is Essential.

Cover Image: Gulp Succinctly

Gulp Succinctly

Gulp is an easy-to learn, easy-to-use JavaScript task runner that has become an industry standard. This book offers an entry to Gulp for experienced developers. Author Kris van der Mast offers practical examples and clear descriptions, making Gulp Succinctly the perfect entry point for developers interested in Gulp. Author: Kris van der Mast Date: 2016

Cover Image: Leaflet.js Succinctly

Leaflet.js Succinctly

This introduction to Leaflet.js will teach key concepts of the software and critical techniques in order to help you develop web-ready interactive maps. Mark Lewin's Leaflet.js Succinctly is the first step on the road to producing the best interactive maps you possibly can. Author: Mark Lewin Date: 2016

Cover book: Full Stack JavaScript Development With MEAN

  • Colin Ihrig

Full Stack JavaScript Development With MEAN

With modern tools, it is possible to create production-grade applications using only JavaScript, HTML, and CSS. The combination of MongoDB, Express, AngularJS, and Node.js, all JavaScript technologies, has become so popular that it’s been dubbed the MEAN stack. This book will explore the MEAN stack in detail.

Cover Image: Hard Rock CoffeeScript

Hard Rock CoffeeScript

Author: Alex Chaplinsky Date: 2014

Cover Image: Knockout.js Succinctly

Knockout.js Succinctly

Knockout.js Succinctly is intended for professional web developers who need to build dynamic, scalable user interfaces with minimal code. Author Ryan Hodson guides you through the essentials of the library, starting with a brief overview of Knockout and its data-oriented aspects, followed by a thorough examination of binding data to various HTML elements, and finally examples of accessing external data and combining Knockout with jQuery animation routines. Complete with code examples and informative diagrams yet shorter than 100 pages, Knockout.js Succinctly is the one resource you need for getting started with Knockout as fast as possible. Author: Ryan Hodson Date: 2014

Cover Image: TypeScript Succinctly

TypeScript Succinctly

The extensive adoption of JavaScript for application development, and the ability to use HTML and JavaScript to create Windows Store apps, has made JavaScript a vital part of the Windows development ecosystem. Microsoft has done extensive work to make JavaScript easier to use. Microsoft's TypeScript extends many familiar features of .NET programming to JavaScript. With TypeScript Succinctly by Steve Fenton, you will learn how TypeScript provides optional static typing and classes to JavaScript development, how to create and load modules, and how to work with existing JavaScript libraries through ambient declarations. TypeScript is even significantly integrated with Visual Studio to provide the autocompletion and type checking you are most comfortable with. Author: Steve Fenton Date: 2014

Cover book: Interactive Data Visualization for the Web

  • Scott Murray

Interactive Data Visualization for the Web

This online version of Interactive Data Visualization for the Web includes 44 examples that will show you how to best represent your interactive data.

Cover Image: Developing Backbone.js Applications

Developing Backbone.js Applications

If you want to build your site’s frontend with the single-page application (SPA) model, this hands-on book shows you how to get the job done with Backbone.js. You’ll learn how to create structured JavaScript applications, using Backbone’s own flavor of model-view-controller (MVC) architecture. Start with the basics of MVC, SPA, and Backbone, then get your hands dirty building sample applications—a simple Todo list app, a RESTful book library app, and a modular app with Backbone and RequireJS. Author Addy Osmani, an engineer for Google’s Chrome team, also demonstrates advanced uses of the framework. Author: Addy Osmani Date: 2013

Cover Image: DOM Enlightenment

DOM Enlightenment

With DOM Enlightenment, you’ll learn how to manipulate HTML more efficiently by scripting the Document Object Model (DOM) without a DOM library. Using code examples in cookbook style, author Cody Lindley (jQuery Cookbook) walks you through modern DOM concepts to demonstrate how various node objects work. Author: Cody Lindley Date: 2013

Cover Image: Single Page Apps In Depth

Single Page Apps In Depth

"This free book is what I wanted when I started working with single page apps. It's not an API reference on a particular framework, rather, the focus is on discussing patterns, implementation choices and decent practices. I'm taking a "code and concepts" approach to the topic - the best way to learn how to use something is to understand how it is implemented. My ambition here is to decompose the problem of writing a web app, take a fresh look at it and hopefully make better decisions the next time you make one." Author: Mikito Takada Date: 2013

Cover Image: Smooth CoffeeScript

Smooth CoffeeScript

Smooth CoffeeScript is a book about CoffeeScript and programming. Start with programming fundamentals, learn about functional programming with Underscore and problem solving, study object orientation and modularity. It covers client/server web apps with Canvas and WebSockets. Author: E. Hoigaard Date: 2012

Cover Image: The Little Book On CoffeeScript

The Little Book On CoffeeScript

This concise book shows JavaScript developers how to build superb web applications with CoffeeScript, the remarkable language that’s gaining considerable interest. Through example code, this guide demonstrates how CoffeeScript abstracts JavaScript, providing syntactical sugar and preventing many common errors. You’ll learn CoffeeScript’s syntax and idioms step by step, from basic variables and functions to complex comprehensions and classes. Written by Alex MacCaw, author of JavaScript Web Applications (O’Reilly), with contributions from CoffeeScript creator Jeremy Ashkenas, this book quickly teaches you best practices for using this language—not just on the client side, but for server-side applications as well. It’s time to take a ride with the little language that could. Author: Alex MacCaw Date: 2012

Cover Image: Writing Modular JavaScript With AMD, CommonJS & ES Harmony

Writing Modular JavaScript With AMD, CommonJS & ES Harmony

Author: Addy Osmani Date: 2012

JavaScript Practice Exercises

For Beginners.

Download all of the JavaScript Practice Exercises For Beginners in one PDF.

If you want to work through all the exercises from the Junior Developer Central YouTube channel, you can get the details of all the exercises ( 25 exercises to work through in total).

Just let me know your email and I will send you a copy of the PDF so you can work through the exercises at your own pace.

Learning JavaScript is just a matter of practice and having some challenges / exercises to work through will enable you to become better by solving problems with your JavaScript skills.

I agree to receive emails in accordance with the Privacy Policy .

You'll need to confirm your address by clicking the link in the email I just sent.

If you don't see the email check your spam/junk/promo folder.

Ooops! Something went wrong, try again or contact me on Twitter or something.

  • DSA with JS - Self Paced
  • JS Tutorial
  • JS Exercise
  • JS Interview Questions
  • JS Operator
  • JS Projects
  • JS Examples
  • JS Free JS Course
  • JS A to Z Guide
  • JS Formatter
  • JavaScript Tutorial

JavaScript Basics

  • Introduction to JavaScript
  • JavaScript Versions
  • How to Add JavaScript in HTML Document?
  • JavaScript Statements
  • JavaScript Syntax
  • JavaScript Output
  • JavaScript Comments

JS Variables & Datatypes

  • Variables and Datatypes in JavaScript
  • Global and Local variables in JavaScript
  • JavaScript Let
  • JavaScript Const
  • JavaScript var

JS Operators

  • JavaScript Operators
  • Operator precedence in JavaScript
  • JavaScript Arithmetic Operators
  • JavaScript Assignment Operators
  • JavaScript Comparison Operators
  • JavaScript Logical Operators
  • JavaScript Bitwise Operators
  • JavaScript Ternary Operator
  • JavaScript Comma Operator
  • JavaScript Unary Operators
  • JavaScript Relational operators
  • JavaScript String Operators
  • JavaScript Loops
  • 7 Loops of JavaScript
  • JavaScript For Loop
  • JavaScript While Loop
  • JavaScript for-in Loop
  • JavaScript for...of Loop
  • JavaScript do...while Loop

JS Perfomance & Debugging

  • JavaScript | Performance
  • Debugging in JavaScript
  • JavaScript Errors Throw and Try to Catch
  • Objects in Javascript
  • Introduction to Object Oriented Programming in JavaScript
  • JavaScript Objects
  • Creating objects in JavaScript (4 Different Ways)
  • JavaScript JSON Objects
  • JavaScript Object Reference

JS Function

  • Functions in JavaScript
  • How to write a function in JavaScript ?
  • JavaScript Function Call
  • Different ways of writing functions in JavaScript
  • Difference between Methods and Functions in JavaScript
  • Explain the Different Function States in JavaScript
  • JavaScript Function Complete Reference
  • JavaScript Arrays
  • JavaScript Array Methods
  • Best-Known JavaScript Array Methods
  • What are the Important Array Methods of JavaScript ?
  • JavaScript Array Reference
  • JavaScript Strings
  • JavaScript String Methods
  • JavaScript String Reference
  • JavaScript Numbers
  • How numbers are stored in JavaScript ?
  • How to create a Number object using JavaScript ?
  • JavaScript Number Reference
  • JavaScript Math Object
  • What is the use of Math object in JavaScript ?
  • JavaScript Math Reference
  • JavaScript Map
  • What is JavaScript Map and how to use it ?
  • JavaScript Map Reference
  • Sets in JavaScript
  • How are elements ordered in a Set in JavaScript ?
  • How to iterate over Set elements in JavaScript ?
  • How to sort a set in JavaScript ?
  • JavaScript Set Reference
  • JavaScript Date
  • JavaScript Promise
  • JavaScript BigInt
  • JavaScript Boolean
  • JavaScript Proxy/Handler
  • JavaScript WeakMap
  • JavaScript WeakSet
  • JavaScript Function Generator
  • JavaScript JSON
  • Arrow functions in JavaScript
  • JavaScript this Keyword
  • Strict mode in JavaScript
  • Introduction to ES6
  • JavaScript Hoisting
  • Async and Await in JavaScript

JavaScript Exercises

Javascript exercises, practice questions and solutions.

If you are a JavaScript learner, then Practice JavaScript Online (JavaScript Exercises) by solving JavaScript quizzes, track progress, and enhance coding skills with our engaging portal. These JavaScript practice questions are ideal for beginners and experienced developers. So, to test your skills, go through these JavaScript exercises with solutions.

A step-by-step JavaScript practice guide for beginner to advanced level.

Benefits of Practice JavaScript

  • Interactive Quizzes: Engage in hands-on JavaScript quizzes.
  • Progress Tracking: Monitor your learning journey.
  • Skill Enhancement: Sharpen coding skills effectively.
  • Flexible Learning: Practice at your own pace.
  • Immediate Feedback: Receive instant results and feedback.
  • Convenient Accessibility: Accessible online, anytime.
  • Real-world Application: Apply JavaScript concepts practically.
  • Comprehensive Learning: Cover a range of JavaScript topics.

How to Start Practice ?

Embark on your JavaScript learning journey with our online practice portal. Start by selecting quizzes tailored to your skill level. Engage in hands-on coding exercises, receive real-time feedback, and monitor your progress. With our user-friendly platform, mastering JavaScript becomes an enjoyable and personalized experience. Elevate your coding expertise today.

JavaScript Best Practice Guide

Dive into JavaScript excellence with our Best Practice Guide. Explore coding standards, optimization techniques, and industry-recommended approaches. Elevate your skills through insightful tips, real-world examples, and interactive challenges. Unlock the secrets of efficient and maintainable JavaScript coding, ensuring your projects stand out with clarity and performance.

Why Practice JavaScript Online ?

Elevate your JavaScript online test experience with categorized fill-in-the-blank questions. This structured format guides your learning, providing targeted challenges for hands-on improvement. Engage in focused practice as it reinforce coding concepts, receive instant feedback, and enhance your skills incrementally. Moreover, by combining theoretical understanding with practical application, you’ll enjoy a comprehensive and effective approach to mastering JavaScript and as a result optimizing your performance in real-world scenarios.

JavaScript online practice Rules

  • Be Honest: Complete challenges independently, refrain from plagiarism or seeking unauthorized help.
  • Manage Time: Adhere to assessment time limits, simulating real-world scenarios.
  • Code Quality : Prioritize clean, efficient, and well-documented code.
  • Follow Guidelines : Adhere to platform-specific instructions, including input/output formats and code submission procedures.
  • No Cheating: Avoid external resources during assessments, unless explicitly allowed.
  • Utilize Feedback: Learn from automated or mentor/community feedback.
  • Participate Actively: Engage in forums, discussions, and share insights with fellow learners.
  • Continuous Improvement: Use assessments to identify and improve areas of weakness for ongoing growth.

Features of Practice Portal

  • Instant Mistake Correction: Receive immediate feedback on errors to facilitate quick learning.
  • Unlimited Tries: Allow learners to attempt questions multiple times for mastery.
  • Time Display for Each Category: Show elapsed time for each set of 5-6 fill-in-the-blank questions to manage time effectively.
  • Table View of Scenarios: Provide a comprehensive table view displaying all categories, their status (completed or pending), and corresponding scores.
  • Performance Analytics: Track progress with detailed analytics, highlighting strengths and areas for improvement.
  • Interactive Code Editor: Offer a responsive code editor for an immersive hands-on experience.
  • Hints and Solutions: Include hints for guidance and solutions to foster self-learning.
  • Community Integration: Facilitate collaboration through forums and discussions for peer learning.
  • Adaptive Difficulty: Adjust difficulty levels based on user performance for personalized challenges.
  • Gamification Elements: Incorporate scoring, achievements, or badges to make learning engaging.

Please Login to comment...

Similar reads.

  • WebTech - Exercises
  • Web Technologies

advertisewithusBannerImg

Improve your Coding Skills with Practice

 alt=

What kind of Experience do you want to share?

CroCoder crocodile in Ukranian traditional clothing

JS Tutorial

Js versions, js functions, js html dom, js browser bom, js web apis, js vs jquery, js graphics, js examples, js references, javascript exercises.

You can test your JavaScript skills with W3Schools' Exercises.

We have gathered a variety of JavaScript exercises (with answers) for each JavaScript Chapter.

Try to solve an exercise by editing some code, or show the answer to see what you've done wrong.

Count Your Score

You will get 1 point for each correct answer. Your score and total score will always be displayed.

Start JavaScript Exercises

Start JavaScript Exercises ❯

If you don't know JavaScript, we suggest that you read our JavaScript Tutorial from scratch.

Kickstart your career

Get certified by completing the course

Get Certified

COLOR PICKER

colorpicker

Contact Sales

If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail: [email protected]

Report Error

If you want to report an error, or if you want to make a suggestion, send us an e-mail: [email protected]

Top Tutorials

Top references, top examples, get certified.

10 Days of Javascript

Calender

Improve your Javascript basics.

Cookie support is required to access hackerrank.

Seems like cookies are disabled on this browser, please enable them to open this website

Navigation Menu

Search code, repositories, users, issues, pull requests..., provide feedback.

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly.

To see all available qualifiers, see our documentation .

javascript-problem-solving

Here are 13 public repositories matching this topic..., munnasorder / javascript_simple_problem_solving.

  • Updated Dec 14, 2022

developer-shourav / Problem-Solving-With-JavaScript

Here is a list of JavaScript problems that I solved. I keep here the problem with solutions and the problem getting source also. Check "problem.md" file to get details about the problem and the provider. Thank you💖

  • Updated Jul 27, 2023

john-azzaro / -JavaScript_Recipes

A handy repository of JavaScript outlines, studies, extended studies, models, prototypes, reference documents, etc. Each “recipe” covers a single subject via step-by-step process or Q&A format!

  • Updated Mar 8, 2020

MehedilslamRipon / Problem-solving-with-JavaScript

Here are available some significant JavaScript problems and solutions.

  • Updated Nov 29, 2022

sabbir1054 / JS-es5-Problem-solving

  • Updated Jun 23, 2021

itizarsa / javascript-workouts

Coding exercises in JavaScript

  • Updated Jan 26, 2021

marsrian / javascript-problem-solved

JavaScript Problem Solved

  • Updated Feb 1, 2023

FahimFBA / 30-days-JS-challenge-LeetCode

30 Days JS Challenge on LeetCode

  • Updated Jun 2, 2023

aa-nadim / javascript-practices

  • Updated Jan 23, 2022

nitishkhobragade / js_practice_03

practice of javascript , also practice of javascript DSA problems solution, replit.com/@NITISHKHOBRAGAD/jsbasics03

  • Updated Apr 23, 2024

FarhanFardid / JS-problem_solving

JavaScript problem solving (coding practice)

  • Updated Feb 8, 2023

shahmeerrizwan / Javascript-practice

Check out my JavaScript Practice repository! Here, I regularly practice JavaScript coding challenges, exercises, to hone my skills. Feel free to explore the code and follow along with my learning journey!

  • Updated Apr 28, 2024

csmahmud99 / js-problem-solving

In this repo, I have solved some junior-level real-life JavaScript problems.

  • Updated Oct 14, 2023

Improve this page

Add a description, image, and links to the javascript-problem-solving topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the javascript-problem-solving topic, visit your repo's landing page and select "manage topics."

Top 72 Swift Interview Questions

25+ JavaScript Coding Interview Questions (SOLVED with CODE)

Having a JavaScript Coding Interview Session on this week? Fear not, we got your covered! Check that ultimate list of 25 advanced and tricky JavaScript Coding Interview Questions and Challenges to crack on your next senior web developer interview and got your next six-figure job offer in no time!

Q1 :   Explain what a callback function is and provide a simple example

A callback function is a function that is passed to another function as an argument and is executed after some operation has been completed. Below is an example of a simple callback function that logs to the console after some operations have been completed.

Q2 :   Given a string, reverse each word in the sentence

For example Welcome to this Javascript Guide! should be become emocleW ot siht tpircsavaJ !ediuG

Q3 :   How to check if an object is an array or not? Provide some code.

The best way to find whether an object is instance of a particular class or not using toString method from Object.prototype

One of the best use cases of type checking of an object is when we do method overloading in JavaScript. For understanding this let say we have a method called greet which take one single string and also a list of string, so making our greet method workable in both situation we need to know what kind of parameter is being passed, is it single value or list of value?

However, in above implementation it might not necessary to check type for array, we can check for single value string and put array logic code in else block, let see below code for the same.

Now it's fine we can go with above two implementations, but when we have a situation like a parameter can be single value , array , and object type then we will be in trouble.

Coming back to checking type of object, As we mentioned that we can use Object.prototype.toString

If you are using jQuery then you can also used jQuery isArray method:

FYI jQuery uses Object.prototype.toString.call internally to check whether an object is an array or not.

In modern browser, you can also use:

Array.isArray is supported by Chrome 5, Firefox 4.0, IE 9, Opera 10.5 and Safari 5

Q4 :   How to empty an array in JavaScript?

How could we empty the array above?

Above code will set the variable arrayList to a new empty array. This is recommended if you don't have references to the original array arrayList anywhere else because It will actually create a new empty array. You should be careful with this way of empty the array, because if you have referenced this array from another variable, then the original reference array will remain unchanged, Only use this way if you have only referenced the array by its original variable arrayList .

For Instance:

Above code will clear the existing array by setting its length to 0. This way of empty the array also update all the reference variable which pointing to the original array. This way of empty the array is useful when you want to update all the another reference variable which pointing to arrayList .

Above implementation will also work perfectly. This way of empty the array will also update all the references of the original array.

Above implementation can also empty the array. But not recommended to use often.

Q5 :   How would you check if a number is an integer?

A very simply way to check if a number is a decimal or integer is to see if there is a remainder left when you divide by 1.

Q6 :   Implement enqueue and dequeue using only two stacks

Enqueue means to add an element, dequeue to remove an element.

Q7 :   Make this work

Q8 :   write a "mul" function which will properly when invoked as below syntax.

Here mul function accept the first argument and return anonymous function which take the second parameter and return anonymous function which take the third parameter and return multiplication of arguments which is being passed in successive

In JavaScript function defined inside has access to outer function variable and function is the first class object so it can be returned by function as well and passed as argument in another function.

  • A function is an instance of the Object type
  • A function can have properties and has a link back to its constructor method
  • Function can be stored as variable
  • Function can be pass as a parameter to another function
  • Function can be returned from function

Q9 :   Write a function that would allow you to do this?

You can create a closure to keep the value passed to the function createBase even after the inner function is returned. The inner function that is being returned is created within an outer function, making it a closure, and it has access to the variables within the outer function, in this case the variable baseNumber .

Q10 :   FizzBuzz Challenge

Create a for loop that iterates up to 100 while outputting "fizz" at multiples of 3 , "buzz" at multiples of 5 and "fizzbuzz" at multiples of 3 and 5 .

Check out this version of FizzBuzz:

Q11 :   Given two strings, return true if they are anagrams of one another

For example: Mary is an anagram of Army

Q12 :   How would you use a closure to create a private counter?

You can create a function within an outer function (a closure) that allows you to update a private variable but the variable wouldn't be accessible from outside the function without the use of a helper function.

Q13 :   Provide some examples of non-bulean value coercion to a boolean one

The question is when a non-boolean value is coerced to a boolean, does it become true or false , respectively?

The specific list of "falsy" values in JavaScript is as follows:

  • "" (empty string)
  • 0 , -0 , NaN (invalid number)
  • null , undefined

Any value that's not on this "falsy" list is "truthy." Here are some examples of those:

  • [ ] , [ 1, "2", 3 ] (arrays)
  • { } , { a: 42 } (objects)
  • function foo() { .. } (functions)

Q14 :   What will be the output of the following code?

Above code would give output 1undefined . If condition statement evaluate using eval so eval(function f() {}) which return function f() {} which is true so inside if statement code execute. typeof f return undefined because if statement code execute at run time, so statement inside if condition evaluated at run time.

Above code will also output 1undefined .

Q15 :   What will the following code output?

The code above will output 5 even though it seems as if the variable was declared within a function and can't be accessed outside of it. This is because

is interpreted the following way:

But b is not declared anywhere in the function with var so it is set equal to 5 in the global scope .

Q16 :   Write a function that would allow you to do this

You can create a closure to keep the value of a even after the inner function is returned. The inner function that is being returned is created within an outer function, making it a closure, and it has access to the variables within the outer function, in this case the variable a .

Q17 :   How does the this keyword work? Provide some code examples

In JavaScript this always refers to the “owner” of the function we're executing, or rather, to the object that a function is a method of.

Q18 :   How would you create a private variable in JavaScript?

To create a private variable in JavaScript that cannot be changed you need to create it as a local variable within a function. Even if the function is executed the variable cannot be accessed outside of the function. For example:

To access the variable, a helper function would need to be created that returns the private variable.

Q19 :   What is Closure in JavaScript? Provide an example

A closure is a function defined inside another function (called parent function) and has access to the variable which is declared and defined in parent function scope.

The closure has access to variable in three scopes:

  • Variable declared in his own scope
  • Variable declared in parent function scope
  • Variable declared in global namespace

innerFunction is closure which is defined inside outerFunction and has access to all variable which is declared and defined in outerFunction scope. In addition to this function defined inside function as closure has access to variable which is declared in global namespace .

Output of above code would be:

Q20 :   What will be the output of the following code?

Above code will output 0 as output. delete operator is used to delete a property from an object. Here x is not an object it's local variable . delete operator doesn't affect local variable.

Q21 :   What will be the output of the following code?

Above code will output xyz as output. Here emp1 object got company as prototype property. delete operator doesn't delete prototype property.

emp1 object doesn't have company as its own property. You can test it like:

However, we can delete company property directly from Employee object using delete Employee.company or we can also delete from emp1 object using __proto__ property delete emp1.__proto__.company .

Q22 :   What will the following code output?

This will surprisingly output false because of floating point errors in internally representing certain numbers. 0.1 + 0.2 does not nicely come out to 0.3 but instead the result is actually 0.30000000000000004 because the computer cannot internally represent the correct number. One solution to get around this problem is to round the results when doing arithmetic with decimal numbers.

Q23 :   When would you use the bind function?

The bind() method creates a new function that, when called, has its this keyword set to the provided value, with a given sequence of arguments preceding any provided when the new function is called.

A good use of the bind function is when you have a particular function that you want to call with a specific this value. You can then use bind to pass a specific object to a function that uses a this reference.

Q24 :   Write a recursive function that performs a binary search

Q25 :   describe the revealing module pattern design pattern.

A variation of the module pattern is called the Revealing Module Pattern . The purpose is to maintain encapsulation and reveal certain variables and methods returned in an object literal. The direct implementation looks like this:

An obvious disadvantage of it is unable to reference the private methods

Rust has been Stack Overflow’s most loved language for four years in a row and emerged as a compelling language choice for both backend and system developers, offering a unique combination of memory safety, performance, concurrency without Data races...

Clean Architecture provides a clear and modular structure for building software systems, separating business rules from implementation details. It promotes maintainability by allowing for easier updates and changes to specific components without affe...

Azure Service Bus is a crucial component for Azure cloud developers as it provides reliable and scalable messaging capabilities. It enables decoupled communication between different components of a distributed system, promoting flexibility and resili...

FullStack.Cafe is a biggest hand-picked collection of top Full-Stack, Coding, Data Structures & System Design Interview Questions to land 6-figure job offer in no time.

Coded with 🧡 using React in Australia 🇦🇺

by @aershov24 , Full Stack Cafe Pty Ltd 🤙, 2018-2023

Privacy • Terms of Service • Guest Posts • Contacts • MLStack.Cafe

javascript problem solving pdf

IMAGES

  1. JavaScript Problem Solving & Algorithms Guide

    javascript problem solving pdf

  2. 33 Javascript Problem Solving Exercises

    javascript problem solving pdf

  3. JavaScript Easy To Learn || Problem Solving

    javascript problem solving pdf

  4. Algorithm Practice JavaScript: Mastering the Art of Problem Solving

    javascript problem solving pdf

  5. Problem Solving with Code

    javascript problem solving pdf

  6. 33 Javascript Problem Solving Exercises

    javascript problem solving pdf

VIDEO

  1. 002. JavaScript. Базовые знания

  2. Уроки JavaScript

  3. JavaScript Problem Solving Hour To Day Converting Using Short Method🔥!!

  4. javascript problem solving question #7 @CodeHelp

  5. Days 12 Javascript Problem Solving Question Important qu |#javascript

  6. Problem Solving #1 Seven Boom!

COMMENTS

  1. FREE PDF: 50 JavaScript Coding Challenges for Absolute Beginners

    Hi Dev.To Community, I'm sharing a PDF with 50 JavaScript coding challenges (and their solutions). All solutions are presented in classic JavaScript syntax in order to appeal to beginners. Advanced users can have fun too!

  2. PDF JavaScript for impatient programmers (ES2022 edition)

    12 1Beforeyoubuythebook 1.1.2 Whatisnotcoveredbythisbook? • Someadvancedlanguagefeaturesarenotexplained,butreferencestoappropri-atematerialareprovided-forexample ...

  3. 2,500+ JavaScript Practice Challenges // Edabit

    Add to collection. How Edabit Works. This is an introduction to how challenges on Edabit work. In the Code tab above you'll see a starter function that looks like this:function hello() {}All you have to do is type return "hello edabit.com" between the curly braces { } and then click the Check button. If you did this correctly, the button will ...

  4. Free Javascript challenges online

    JSchallenger recognizes what skill level you're on and adjusts the difficulty of the next challenges automatically. Making you continuously improve your Javascript skills in a short amount of time. JSchallenger. Free Javascript challenges. Learn Javascript online by solving coding exercises. Javascript for all levels.

  5. 10+ Free JavaScript Books in PDF for Beginners and Pros

    This book is particularly beneficial for developers aiming to enhance their problem-solving skills and gain a more profound understanding of JavaScript's core concepts. With a focus on clarity and practical examples, "JavaScript Enlightenment" serves as a valuable resource, providing a solid foundation for developers to write more effective and ...

  6. PDF 50 coding challenges

    Create a function that will return the number of words in a text. 32. Create a function that will capitalize the first letter of each word in a text. 33. Calculate the sum of numbers received in a comma delimited string. 34. Create a function that returns an array with words inside a text. 35.

  7. PDF Free-Web-Development-eBooks/book/Javascript/JavaScript Recipes

    You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window.

  8. JavaScript Problem Solving & Algorithms Guide

    It feels good, and it seems like you're making real progress…. What FCC didn't teach you is how to problem solve. It gave you the tools, but it's now onto you to figure out the right ...

  9. JavaScript Recipes: A Problem-Solution Approach

    Using a problem-solution approach, this book takes you from language basics like built-in objects and flow control all the way to advanced optimization techniques, frameworks and Node.js. With JavaScript Recipes you will learn language fundamentals like types, conversions, execution contexts, expressions, operators, statements, and built-in ...

  10. Solve common problems in your JavaScript code

    For more information on JavaScript debugging, see Handling common JavaScript problems. Also, see Other common errors for a description of common errors. Making decisions in code

  11. 70 Free JavaScript Books

    70 Free JavaScript Books. Best free JavaScript books: ECMAScript, jQuery, and other. Download ebooks (pdf, mobi, epub) and read online. Update of December 2017 collection. 6 new books. JavaScript, often abbreviated as JS, is a high-level, dynamic, weakly typed, prototype-based, multi-paradigm, and interpreted programming language.

  12. JavaScript Practice Exercises

    Download all of the JavaScript Practice Exercises For Beginners in one PDF. If you want to work through all the exercises from the Junior Developer Central YouTube channel, you can get the details of all the exercises ( 25 exercises to work through in total). Just let me know your email and I will send you a copy of the PDF so you can work ...

  13. JavaScript Exercises, Practice, Solution

    JavaScript Exercises, Practice, Solution: JavaScript is a cross-platform, object-oriented scripting language. Inside a host environment, JavaScript can be connected to the objects of its environment to provide programmatic control over them.

  14. JavaScript Exercises, Practice Questions and Solutions

    If you are a JavaScript learner, then Practice JavaScript Online (JavaScript Exercises) by solving JavaScript quizzes, track progress, and enhance coding skills with our engaging portal. These JavaScript practice questions are ideal for beginners and experienced developers. So, to test your skills, go through these JavaScript exercises with ...

  15. javascript-exercises · GitHub Topics · GitHub

    Add this topic to your repo. To associate your repository with the javascript-exercises topic, visit your repo's landing page and select "manage topics." GitHub is where people build software. More than 100 million people use GitHub to discover, fork, and contribute to over 420 million projects.

  16. JavaScript DOM

    We have prepared some exercises to help out beginner devs to solidify their understanding of the DOM. Every exercise has a brief description of the problem, starting code, links to relevant MDN docs, and expected results. Try to solve the problems without taking a peek at the solution. If you need some additional help, you can check out our The ...

  17. JavaScript Exercises

    W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.

  18. Problems

    Boost your coding interview skills and confidence by practicing real interview questions with LeetCode. Our platform offers a range of essential problems for practice, as well as the latest questions being asked by top-tier companies.

  19. Solve Tutorials

    Improve your Javascript basics. Join over 23 million developers in solving code challenges on HackerRank, one of the best ways to prepare for programming interviews.

  20. 30 Days of JavaScript

    Award. 30 Days of JavaScript. Complete the study plan to win the badge! Learn JS Basics with 30 Qs.

  21. javascript-problem-solving · GitHub Topics · GitHub

    Add this topic to your repo. To associate your repository with the javascript-problem-solving topic, visit your repo's landing page and select "manage topics." GitHub is where people build software. More than 100 million people use GitHub to discover, fork, and contribute to over 420 million projects.

  22. 25+ JavaScript Coding Interview Questions (SOLVED with CODE)

    console.log(anotherArrayList); // Output ['a', 'b', 'c', 'd', 'e', 'f'] Method 2. arrayList.length = 0; Above code will clear the existing array by setting its length to 0. This way of empty the array also update all the reference variable which pointing to the original array. This way of empty the array is useful when you want to update all ...

  23. Accurate adaptive deep learning method for solving elliptic problems

    formulations of symmetric elliptic problems, while loss functions for the PINNs are based on the residual forms of the original PDEs. Due to the requirement of symmetry in construction of the loss function, PINNs are more widely used for solving PDEs, compared to the deep Ritz method. As for elliptic interface problems, these two methods en-