Decoding JavaScript: A Simple Guide for the Not-so-Simple JavaScript Concepts, Libraries, Tools, and Frameworks
- Length: 370 pages
- Edition: 1
- Language: English
- Publisher: BPB Publications
- Publication Date: 2021-05-21
- ISBN-10: 9390684811
- ISBN-13: 9789390684816
- Sales Rank: #4324027 (See Top 100 Books)
Mastering advanced JavaScript to build modern next-generation web applications.
Key Features
- A simplified explanation of complex concepts to create powerful and flexible web applications.
- Learn testing JavaScript code, regular expressions, fetching data, and many more with ES6.
- A full-fledged section dedicated to developing an application using JavaScript.
Description
Decoding JavaScript will take the users on an eventful journey of simplifying and understanding advanced concepts of JavaScript. Since JavaScript is the core programming language for almost every interaction on the web, this book will make it easier for readers to develop modern cutting-edge web applications.
The book begins with a quick recap of the fundamental JavaScript (JS) concepts like the syntax of JS, data types, operators, conditionals, looping, functions, arrays, objects, and so on. The readers will also explore the handy Chrome Developers’ Tools.
This book will also help readers learn and implement important concepts like how to connect to the servers, fetching data like images, user information, videos, etc. from the server, and displaying it on the web page. Besides that, users will learn about impactful concepts like testing JavaScript code, regular expressions, and exploring the popular ES6 and the versions beyond. Most importantly, this book will help you with the best JavaScript practices followed by companies like Google, Facebook, Twitter, etc. to develop a live application right from scratch.
What you will learn
- Build dynamic web applications interacting with servers using Vanilla.
- Improve code efficiency by learning advanced concepts of JavaScript.
- Get acquainted with best practices adopted by industry leaders, including Google and Facebook.
- Get access to work with popular libraries like ReactJS, jQuery, Angular, Ember, and Vue.
Who this book is for
This book is for aspiring web developers and fairly experienced JavaScript developers who want to create modern web and server applications. Prior knowledge of HTML and CSS is essential to begin with this book.
About the Authors
Rushabh Shah, is a published technical author, content creator, technical mentor, and Senior UI Developer. He is also one of the founding members of an exciting AI startup by the name of Eugenie.ai. In his 5+ years of experience, he has interacted with several prominent clients, including the Indian Navy, Mondelez India, Colgate Palmolive, EY, RB, and many others.
Apart from his usual stint, Rushabh has also been an influential blogger and a content writer. His articles on SportsKeeda, Little Black Book (LBB), NearFox, Zomato, and other such platforms have garnered more than 600K views. His private blog has been nominated for four consecutive years at the national level.
LinkedIn Bio: https://www.linkedin.com/in/rushabh-shah-83869a95/
Cover Page Title Page Copyright Page Dedication Page About the Author About the Reviewer Acknowledgement Preface How to use this book? Errata Table of Contents 1. Introduction to JavaScript Structure Objective Getting started with JavaScript The Inception of JavaScript What exactly is JavaScript? Setting up the system How to add JavaScript to your web page? Comments in JavaScript Datatypes and operators in JavaScript Datatypes and variables in JavaScript Create a variable (declaration) Give a value to the variable (initialization) Data types in JavaScript Operators in JavaScript Conditionals and looping in JavaScript Conditional coding in JavaScript If…else conditional statement Switch conditional statement Looping in JavaScript The Journey of the Web Page JavaScript and the DOM Conclusion Points to remember Multiple choice questions Answers 2. The Developer’s Tools Structure Objective Event Listeners in JavaScript Introduction to the Developer Tools Opening the DevTools Panels of DevTools JavaScript and the DevTools Console Panel Console Area Filter Area Header of the console Sources Panel Conclusion Points to remember Multiple choice questions Answers 3. Functions Structure Objective Exploring Functions Syntax Functions returning values Types of functions JavaScript Scope JavaScript Closure Conclusion Points to remember Multiple choice questions Answers 4. Arrays Structure Objective Introducing Arrays Using Arrays Creating an array Declaring an array Initializing an array Access the elements of an array Change the elements of an array Array Properties and Methods length Accessing first and last elements of an array Looping through an array push and pop delete shift and unshift splice and slice Splicing an array Slicing an array concat toString join Conclusion Points to remember Multiple choice questions Answers 5. Objects Structure Objective Introducing Objects Using objects Object definition An object literal JavaScript keyword new Constructor Object properties and methods Object properties Accessing Object Properties Dot notation Square bracket notation Changing object properties Displaying object properties Display object properties by name Using Object.values() Object methods The 'this' keyword Objects versus Primitive values Copy by value Copy by reference Object Constructors Object Prototypes Conclusion Points to remember Multiple choice questions Answers 6. ES6 Structure Objective Introduction to ES6 JavaScript hoisting New ES6 Syntax Let and const let const Bind, call, and apply bind call apply Advanced operators Ternary operator Rest Parameters Spread operators Template literals Arrow functions Shorter syntax The this keyword in ES6 functions New array methods – map, filter, and reduce map() filter() reduce() Array and object destructuring ES6 Modules Conclusion Points to remember Multiple choice questions Answers 7. Classes Structure Objective Understanding classes When to use functions and when to use classes? Are classes hoisted? Classes and methods Inheritance Getters and Setters Conclusion Points to remember Multiple choice questions Answers 8. Callbacks and Promises Structure Objective Asynchronous JavaScript When to use asynchronous JavaScript Callback Functions How can callback functions help in asynchronous JavaScript Callback Hell Promises Chaining Promises async and await async await Conclusion Points to remember Multiple choice questions Answers 9. AJAX and Interacting with Servers Structure Objective JSON – The Web’s favorite file format Structure of JSON Working with JSON JSON.stringify() JSON.parse() Exchanging data AJAX HTTP HTTP Methods GET POST PUT PATCH DELETE HEAD OPTIONS HTTP status messages 1xx: Information 2xx: Successful 3xx: Redirection 4xx: Client Error 5xx: Client Error The Process of AJAX HTTP Headers setRequestHeader() Conclusion Points to remember Multiple choice questions Answers 10. Developing a Live Application! Structure Objective The live application – Nom Nom! Software development lifecycle The Idea The Flow The Design Laying the foundations The folder structures Creating the HTML files Index.html Recipe-detail.html The Initial Styling Connecting to the server Updating the Home page with the server response Moving to the Recipe Detail page Updating the Recipe Details page Fetching the detailed recipe Fetching the id passed from the home page Sending a request to the server with the id Create the HTML elements inside the Recipe Details page Adding the link back to the home page System testing Adding a text for loading Error Handling Conclusion Points to remember Multiple choice questions Answers 11. Storing Data in Browsers Structure Objective Introduction to Web Storage Cookies Usage Disadvantage Structure Creating cookie with JavaScript Reading cookies with JavaScript Deleting cookies with JavaScript Security Third-party cookies Web storage APIs Session Storage Setting the value inside session storage Fetching the value from session storage Removing a value from session storage Local Storage Setting the value inside local storage Fetching the value from local storage Removing a value from local storage IndexedDB API Features of IndexedDB API IndexedDB terms IndexedDB process Check if IndexedDB is supported Open the database Add data View data Service workers Caches Testing on Console Conclusion Points to remember Multiple choice questions Answers 12. Debugging and Error Handling Structure Objective Errors Types of Errors EvalError RangeError ReferenceError SyntaxError TypeError URIError Introduction to Debugging The console.log() method Debugging with breakpoints The debugger keyword Try, catch, and finally Conclusion Points to remember Multiple choice questions Answers 13. Testing and Test Frameworks Structure Objective Introduction to testing Test-Driven Development Behavior-Driven Development Types of testing Unit tests Integration tests End-to-end tests Ideal testing structure Testing Frameworks jsdom Karma Chai Cucumber Jest Jasmine Mocha Selenium Jest Install package managers Initialize a new project Install Jest using npm or yarn Create a function for testing Create the test file Add/Modify package.json Running the test Conclusion Points to remember Multiple choice questions Answers 14. Regular Expressions Structure Objective Introduction to Regular Expressions Creating a Regular Expression Regular Expression Literal JavaScript RegExp Object Writing Regular Expressions pattern Using simple patterns Using groups and ranges x|y [xyz] or [x-z] [^xyz] or [^x-z] Using special characters Assertions ^ $ \b x(?=y) (?<=y)x Character Classes Quantifiers Advanced searching with flags g i m JavaScript methods for Regular Expressions exec() test() matchAll() replace() replaceAll() Practical example of Regular Expressions Conclusion Points to remember Multiple choice questions Answers 15. Life After ES6 Structure Objective Introduction to ECMAScript The Origin The Browser War The Standardization So, is JavaScript the same as ECMAScript? The Versions ES6 – The new future! ES7 Array.prototype.includes() Exponentiation Operator ES8 Object.values() Object.entries() String padding Async functions (async and await) Trailing commas in functions Object.getOwnPropertyDescriptors() ES9 Rest/Spread properties Regular Expression – Lookahead and Lookbehind Asynchronous Iterations Finally in promises ES10 Array.flat() Array.flatMap() Object.fromEntries() String.trimStart() and String.trimEnd() Function.toString() Optional catch binding ES11 Optional chaining operator Private fields Dynamic Imports Import meta New datatype - bigint globalThis matchAll Promise.allSettled() ES.Next Conclusion Points to remember Multiple choice questions Answers 16. Tips and Tricks Structure Objective Best practices Naming Naming conventions White Spaces Rule of 80 Declarations at the top of the scope Consistency with quotes Comment your code often Tips and Tricks Filter unique values in an array Object destructuring Get last items of an array Set dynamic keys of an object Truncate an array Improving conditionals Setting default values Every and some Conclusion Points to remember Index
Donate to keep this site alive
1. Disable the AdBlock plugin. Otherwise, you may not get any links.
2. Solve the CAPTCHA.
3. Click download link.
4. Lead to download server to download.