DEV Community

Harit Himanshu
Harit Himanshu

Posted on

 

JavaScript: “Value below was evaluated just now”, what does it mean?

Folks I am trying to list down what happens behind the scenes when new keyword is used to create an instance.

Here is what my code looks like

function F() {}
let f1 = new F()
f1.__proto__

When I understood so far is that when new is used, a new…

Latest comments (0)

11 Tips That Make You a Better Typescript Programmer

typescript

1 Think in {Set}

Type is an everyday concept to programmers, but it’s surprisingly difficult to define it succinctly. I find it helpful to use Set as a conceptual model instead.

#2 Understand declared type and narrowed type

One extremely powerful typescript feature is automatic type narrowing based on control flow. This means a variable has two types associated with it at any specific point of code location: a declaration type and a narrowed type.

#3 Use discriminated union instead of optional fields

...

Read the whole post now!