r/shittyprogramming • • Mar 10 '23

Javascript is hard sometimes

Post image
512 Upvotes

64 comments sorted by

View all comments

Show parent comment

5

u/wsbTOB Mar 10 '23

I don’t know that much about javascript but if you look at, say C, where there is no native string type: a string in practice is an array of characters suffixed with a terminator “\0”.

Higher level languages are free to wrap this lower level implementation into an object of any sort but that’s the basic idea.