1

How to calculate the memory occupied by a variable in JavaScript? I want to know if there is an operation like sizeof.

geek machine
  • 173
  • 1
  • 2
  • 8
  • as what I know it's **impossible** especially your variable's value is a complicated object, which its properties are in turn another objects – Nhat Hong Ly May 15 '19 at 05:22
  • There's [this SO answer](https://stackoverflow.com/a/11900218/9070080), which makes a rough estimate on the size of an object, but there is no inbuilt function that can do this – Snel23 May 15 '19 at 05:25

0 Answers0