Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tip #35 Elaborate on ++ and -- #223

Closed
ffigiel opened this issue Feb 4, 2016 · 7 comments
Closed

Tip #35 Elaborate on ++ and -- #223

ffigiel opened this issue Feb 4, 2016 · 7 comments
Assignees

Comments

@ffigiel
Copy link
Contributor

ffigiel commented Feb 4, 2016

Sorry to bash on this tip like that, but I think we could provide more details on ++ and -- operators. Maybe add a new section about them?

For example, what's the difference between var b = --a; and var b = a--;?

@timomeh
Copy link

timomeh commented Feb 4, 2016

Seeing that post I immediately thought that, too.

Knowing the difference between a-- and --a is quite useful – especially in combination with ternary operators.

@hsleonis
Copy link
Contributor

hsleonis commented Feb 7, 2016

Yeah. a-- and --a or a++ and ++a are quite interesting.

var a = 3;
var b = --a; // Now b is 2

And

var a = 3;
var b = a--; // Now b is 3

@zenopopovici
Copy link
Collaborator

@megapctr Could you create a new PR with the proposed changes? We'll merge once we review it.

Thanks.

@zenopopovici zenopopovici changed the title #35 Elaborate on ++ and -- Tip #35 Elaborate on ++ and -- Feb 20, 2016
@ffigiel
Copy link
Contributor Author

ffigiel commented Feb 20, 2016

You're welcome 😉

zenopopovici added a commit that referenced this issue Feb 22, 2016
Describe double plus/minus operators. Closes #223
@ffigiel
Copy link
Contributor Author

ffigiel commented Feb 22, 2016

I noticed that jstips.co doesn't render my ordered list properly (compare to github). Should I open an issue for this?

@zenopopovici
Copy link
Collaborator

@loverajoel It seems that Jekyll is doing something fishy with the GitHub pages. Is this related to the warning we receive on each merge?

@loverajoel
Copy link
Owner

@zenopopovici @mebjas so strange, I think that maybe it's related with the Jekyll update in the last time for Github, I will back with more info.
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants