Contact: aviboots(AT)netvision.net.il
41,427 questions
53,974 answers
573 users
// Get size of the variable (approximation for JavaScript) const myVar = 86; const sizeOfMyVar = new TextEncoder().encode(myVar.toString()).length; console.log(`Size of myVar: ${sizeOfMyVar} bytes`); /* run: Size of myVar: 2 bytes */