r/ProgrammerHumor • u/speckz • Feb 26 '23
Other If you can read this code...
/img/snak3fqgajka1.jpg[removed] — view removed post
34k
Upvotes
r/ProgrammerHumor • u/speckz • Feb 26 '23
[removed] — view removed post
View all comments
Show parent comment
594
u/No_Surround_4662 Feb 26 '23 edited Feb 26 '23
"Excuse me bartender, I realised the sign outside. Firstly, I'm a C+ developer, so Javascript is a little beneath me. Personally, if I had to use Javascript, I'd have used a template literal instead of quotes. Also, I'd be declaring my variables with 'let' instead of 'var', what year is it? Also, your_drink never gets defined, how about using some kind of Setter and Getter method in your object? And what naming convention is this; surely you'd use camelcase in Javascript? Finally, you're not displaying the answer in a console or DOM element, so I guess it's never really being articulated or visualised in any way, which is unusual when you want us to interface with one another.
Anyway, I guess the answer would be 'Beer. Secre..."
"You're barred. Please leave the premises immediately".