Tell me what this produces without opening it in a browser

Tell me what this produces without opening it in a browser.
No cheating.
Just wanna see if I am the only one that finds Javascript a pain in the ass.

var total = 0, count = 1;while (count

It counts to 10? I'm not good at computer.

That's what I thought too.
In the browser it said 55.
wtf?

it calculates 10+9+8+7+6+5+4+3+2+1+0

It adds all natural numbers from 1 to 10 and displays the result on the screen. It's basic programming, you'll find it everywhere, not only in Javascript. Heck, I don't even know javascript

OH

this. javascript can be a pain, but this isn't really.

Sum of numbers 1-10. Hate to say it OP, but this is nothing specific to Javascript. Everywhere you look you'll find loops like this, and if you really want to understand what a piece of code does, you've just gotta reason through them. At least this has got variable names ;). If you find the time for cracking games, you gotta deal with assembly, and that's a whole different load of obfuscated.

Well now that he said it, I see the light.
while count is less than/equals to 10 add count(1) to total.

You made a mistke by thinking something alng the lines "Phew, that's easy". Don't do that ever, if you want to be good at programming you have to come to every, even the most trivial problem analitically, with open mind. You aren't a programme, you make them

...

You got it. Once you get to a certain point, code starts to become write-only. They tell you shit about the importance of good commenting, but really it's compartmentalization (object-oriented programming) that holds together modern applications. Nobody understands the internals of other people's code, and as long as it does what it's supposed to, they don't have to.

It is good only if you are doing a project of your own, not wanting to share it anywhere and just keep the code for yourself. Good commenting is important, how many times have I gone back to my older projects to see something that I thought wasn't really mine. Your way of thinking won't do any good in bigger projects, longer ones, basically, more serious ones

you have much greater problems than understanding javascript

the sum of all numbers from 0 to 10?

lmao, in haskell, this is just
sum [1..10]

>can't into
You have greater problems than my logic, that's for sure.

Dafuq is this?
function fac(n) { return n == 0 ? 1 : n * fac(n - 1);}

1+2+3+4+5+6+7+8+9+10

troll or an actual retard?

this is a troll so gtfo

I'm a software engineer, don't listen to this faggot

I can't tell you how much I hate faggots that don't comment their code. The reason this is a problem is that most of the time their code DOESN'T do what its supposed to.

Even if they wrote something 100% perfect that has no bugs (unlikely), there's always the possibility of someone going back over the same code to add functionality because of changing requirements. I can't tell you how much time I wasted because I assumed code written by someone previous was good, only to discover the bug I was having was because of shitty code I didn't bother to look at, and then when I do look at it, it's a trash pile and I have to play the game of "Okay let's imagine I'm a retard, why would I code it like this?"

damage control
you got rekt! move on

...

Your shitty slang is not welcomed here.
I can't into it.
must be lost motherfucker

lol figures a Holla Forums trumpkin can't code. i know all i need to know now. you're forgiven poor guy.

no i can't hence the post asking questions to learn.
Something that libtards can't do. Too stuck on stupid.
Still salty about Hillary losing, lil guy? Hm? Do you want a safe space? Hm?