2 added 7 characters in body
source | link

Shortening returning

You can shorten return statements of strings by a byte with:

return "something";

to

return"something";

And, if you happen to begin your return statement with a parenthesis, you can do the same thing with them:

return (1+taxRate)*value;

to

return(1+taxRate)*value;

I guess quotes are considered like stringsparentheticals? I actually picked this up through AppleScript, funnily enough, and thought it might be worth mentioning.

Shortening returning

You can shorten return statements of strings by a byte with:

return "something";

to

return"something";

And, if you happen to begin your return statement with a parenthesis, you can do the same thing with them:

return (1+taxRate)*value;

to

return(1+taxRate)*value;

I guess quotes are considered like strings? I actually picked this up through AppleScript, funnily enough, and thought it might be worth mentioning.

Shortening returning

You can shorten return statements of strings by a byte with:

return "something";

to

return"something";

And, if you happen to begin your return statement with a parenthesis, you can do the same thing with them:

return (1+taxRate)*value;

to

return(1+taxRate)*value;

I guess quotes are considered like parentheticals? I actually picked this up through AppleScript, funnily enough, and thought it might be worth mentioning.

1
source | link

Shortening returning

You can shorten return statements of strings by a byte with:

return "something";

to

return"something";

And, if you happen to begin your return statement with a parenthesis, you can do the same thing with them:

return (1+taxRate)*value;

to

return(1+taxRate)*value;

I guess quotes are considered like strings? I actually picked this up through AppleScript, funnily enough, and thought it might be worth mentioning.