jed / 140bytes Goto Github PK
View Code? Open in Web Editor NEWOnce a tweet-sized, fork-to-play, community-curated collection of JavaScript.
Once a tweet-sized, fork-to-play, community-curated collection of JavaScript.
I saw that the Math.floor
trick is documented but the not Math.ceil
altough it's being used here:
a = 10.5;
~~a; //=> 10
-~a; //=> 11
After OAuth'ing, the "Log in with GitHub"-button redirects me back to the 140byt.es without doing anything.
In the main page it says:
for and while require the same number of bytes
But it is not the case if you want an infinite loop such as:
for(;;) {
}
over
while(!0) {
}
Or is there something better?
=>
is a huge win when you can get rid of the hole word function
& return
I was looking at https://github.com/jed/140bytes/wiki/Byte-saving-techniques and the majority of examples on what is byte saving is what something like Uglify should be doing.
Other examples like
setInterval('console.log("z")',100) // after
is a definite no since that's an example of implicit eval
call
function(a,b){b=1;...} // after
is also not good since V8 doesn't like that and it de-optimized code
https://github.com/vhf/v8-bailout-reasons provides good desc of potential issues.
I am just making sure that people who are new to JS don't take these examples and uses them thinking they are doing a good thing.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.