TurboScript
TurboScript copied to clipboard
User wants to have "sizeof" function
What?
User wants to have sizeof
function to get storage size of a variable or type in bytes.
How?
let a = new Array<float32>(10);
console.log(sizeof a); //48 => 4 (sizeof float32) x 10 + 8 (array header, byte length + element size)