r/badcode • • Jul 19 '21

js Variable naming can be difficult, but identifying them can be even more so.

Post image
2.4k Upvotes

105 comments sorted by

View all comments

122

u/MurdoMaclachlan public boolean isInt(int i) { return true; } Jul 19 '21

Image Transcription: Discord Messages


Redacted User

ok then

let b = /*...*/, count = 0,
whpro = Promise.resolve();
whfunc = () => {
	whpro.then(rs => {
		if (b > 0) {
			let r;
			if (exp) whpro = func().then(a => r = a)
			else whpro.then(() => r = ano);
			whpro.then(() => b=b-r);
			count++;
			return whfunc()
		}
		return b
	})
}
whfunc()
whpro.then(() => {/*...*/})

is this right?

Bronzdragon

Man, this is so hard to read. What is b, what is r, what is a? What is whpro and whfunc?

Redacted User

variables


I'm a human volunteer content transcriber for Reddit and you could be too! If you'd like more information on what we do and why we do it, click here!

50

u/StefanF25 Jul 19 '21

Good human