r/shittyprogramming • • Mar 10 '23

Javascript is hard sometimes

Post image
504 Upvotes

64 comments sorted by

View all comments

Show parent comment

2

u/pacanukeha Mar 12 '23

let a = 0;
let b = "helloworld".split('');
while (b.pop()){
a += 1;
}
console.log(a);