Javascript.info
“Javascript.info” is a comprehensive online resource for learning JavaScript, covering a wide range of topics from basic to advanced concepts. The content is structured in a beginner-friendly manner, making it accessible for learners of all levels. The website provides detailed explanations, code examples, and interactive exercises to help readers grasp JavaScript fundamentals and enhance their programming skills. With a focus on practical applications and real-world scenarios, “Javascript.info” aims to equip individuals with the knowledge and tools needed to become proficient in JavaScript development.
Arrays
Objects allow you to store keyed collections of values. That’s fine. But quite often we find that we need an ordered collection , where we have a 1st, a 2nd, a 3rd element and so on. For example, we n...
📚 Read more at Javascript.info🔎 Find similar documents
Comparisons
We know many comparison operators from maths. In JavaScript they are written like this: Greater/less than: a b , a < b . Greater/less than or equals: a = b , a <= b . Equals: a == b , please note the ...
📚 Read more at Javascript.info🔎 Find similar documents
Class checking: "instanceof"
The instanceof operator allows to check whether an object belongs to a certain class. It also takes inheritance into account. Such a check may be necessary in many cases. For example, it can be used f...
📚 Read more at Javascript.info🔎 Find similar documents
Code structure
The first thing we’ll study is the building blocks of code. Statements Statements are syntax constructs and commands that perform actions. We’ve already seen a statement, alert('Hello, world!') , whic...
📚 Read more at Javascript.info🔎 Find similar documents
Developer console
Code is prone to errors. You will quite likely make errors… Oh, what am I talking about? You are absolutely going to make errors, at least if you’re a human, not a robot . But in the browser, users do...
📚 Read more at Javascript.info🔎 Find similar documents
Function binding
When passing object methods as callbacks, for instance to setTimeout , there’s a known problem: “losing this ”. In this chapter we’ll see the ways to fix it. Losing “this” We’ve already seen examples ...
📚 Read more at Javascript.info🔎 Find similar documents
Error handling, "try...catch"
No matter how great we are at programming, sometimes our scripts have errors. They may occur because of our mistakes, an unexpected user input, an erroneous server response, and for a thousand other r...
📚 Read more at Javascript.info🔎 Find similar documents
Function object, NFE
As we already know, a function in JavaScript is a value. Every value in JavaScript has a type. What type is a function? In JavaScript, functions are objects. A good way to imagine functions is as call...
📚 Read more at Javascript.info🔎 Find similar documents
Async/await
There’s a special syntax to work with promises in a more comfortable fashion, called “async/await”. It’s surprisingly easy to understand and use. Async functions Let’s start with the async keyword. It...
📚 Read more at Javascript.info🔎 Find similar documents
Prototype methods, objects without __proto__
In the first chapter of this section, we mentioned that there are modern methods to setup a prototype. Setting or reading the prototype with obj.__proto__ is considered outdated and somewhat deprecate...
📚 Read more at Javascript.info🔎 Find similar documents
Polyfills and transpilers
The JavaScript language steadily evolves. New proposals to the language appear regularly, they are analyzed and, if considered worthy, are appended to the list at https://tc39.github.io/ecma262/ and t...
📚 Read more at Javascript.info🔎 Find similar documents
Arrow functions revisited
Let’s revisit arrow functions. Arrow functions are not just a “shorthand” for writing small stuff. They have some very specific and useful features. JavaScript is full of situations where we need to w...
📚 Read more at Javascript.info🔎 Find similar documents