DEV Community

Discussion on: var vs let vs const in JavaScript

Collapse
 
thekashey profile image
Anton Korzunov

It's 2019, it's not a good time to compare var and let/const.

What if to compare let, const and Readonly from TS/Flow?

const constVariable: Record<string, any> = {};

constVariable.b = "is it const?";

const reallyConstVariable: Readonly<Record<string, any>> = {};

reallyConstVariable.b = "is it const?";
Collapse
 
tylermcginnis profile image
Tyler McGinnis

I'll be sure to ask your permission next time I write something.