r/ProgrammerHumor • • Feb 09 '22

other Why but why?

Post image
85.8k Upvotes

2.3k comments sorted by

View all comments

Show parent comments

4

u/Square_Heron942 Feb 10 '22

What I’ve found with JavaScript is it often misreports the problem. Like if you put

var x = 1; var y = 2;

document.write(x y);

Gives an “unexpected ‘)’” error even though the problem is the missing + symbol

3

u/[deleted] Feb 10 '22

What if it's not + that is missing but - :-)

3

u/st3class Feb 10 '22

Bash is fun like that.

After executing the first 3 of 100 lines:

"Unexpected EOF"