Thank you for stopping by! I am a full-stack developer that combines the power of entrepreneurship and programming to make the lives of programmers easier.
Thank you for stopping by! I am a full-stack developer that combines the power of entrepreneurship and programming to make the lives of programmers easier.
I like defining one of these macros when swapping variables in C:
The second one works on floating point numbers too.
That's a good one. Although it won't work in Javascript I think.
x=10;y=5;console.log(x,y);(x=(x-(y = (x=x+y)-y)));console.log(x,y)
I think it doesn't like the double assignment on same expression. In JS you can do:
or
although less readable.
[] allocates new space I think so this solution won't be in constant space.