Quantcast
Channel: String length in bytes in JavaScript - Stack Overflow
Viewing all articles
Browse latest Browse all 19

Answer by Mannan for String length in bytes in JavaScript

$
0
0
str = "Hello, World!";str.length/1024*1024; // here's the number of bytes

above is a shorter way to get the string size in bytes


Viewing all articles
Browse latest Browse all 19

Latest Images

Trending Articles



Latest Images