Skip to content

Improvement: concatenating numbers #3

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

EduardoSantosF
Copy link

@EduardoSantosF EduardoSantosF commented Jul 19, 2022

Instead of just adding + 1 to get any number, this solution concatenates the numbers doing something like this:
'123' === '1' + ( 1 + 1 ) + ( 1 + 1 + 1 )

which is way smaller than adding + one 123 times

original output = 117k characters
improved output = 92k characters
jsFuck output = 8k LOL

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

Successfully merging this pull request may close these issues.

1 participant