Javascript chellenges, what is output of this code?
I'm new with Javascript and I love Sololearn chellenges, but i have trouble with some questions in quiz. I'm sorry if this is not where I need to post this stuff but I need to find out few things. 1st question: What is the output of this code? var a=3, b=7; if((a++ > 5) && (b > 4)) document.write(b); else document.write(a); The answer is 4. Well, I see that correct is ''else'' but what I don't know why is 4 instead of 3, in if part saying a++ but how is that affect if correct is else statement? I thought the correct answer would be 3. 2nd question: What is output of this code? var a = [1,2,3,4,5]; var c = []; c[0] = new Array(a); a[c.length] = 3; alert(c[0]); Correct answer in this one says 1,3,3,4,5 and i wondered why, I need explanation with this. This is maybe funny questions to those who has more experience so please don't laugh. :)