I’ve got a challenge: Make the Shortest File Information Project. I made this example:
So the user will put a file(s) inside the
files folder. For every file in that folder, it will display the char count, word count, etc.
I will not accept minified JS as an answer. The console.log() line will not be counted in the number of characters, so you can make it as long as you want. I will be using
https://www.uglifyjs.net/ to measure the amount of characters, so you don’t need to worry about spaces and indents. Also, I will be also measuring by the number of features and grammar.
lightdefusion’s - https://replit.com/@lightdefusion/SFIP#index.js
Matt’s - https://replit.com/@MattDESTROYER/File-Info?v=1
justcoding’s - https://replit.com/@JustCoding123/shortest-file-info
NOTE - I AM ORDERING THE LINKS BASED ON TIME SENT!
Hmmm, why does this not include things like permissions, but instead has things like word count.
And is the only in js?
In less than 15 lines I did this here.
Slighly messy output, but pretty good in my opinion.
What?? UglifyJS said valid JS only…
Nvm… I will count the console.log() lines. Sorry if this mislead you
Well, I’m sorry, Praquron, but lightdefusion did better. Yours was good, too, but I said
“So the user will put a file(s) inside the files folder. For every file in that folder, it will display the char count, word count, etc.”
Ok, updated it, should be following the rules now
Yes, it’s only in JS.
You can have as much features as you want, the screenshot is only a very basic example.
Also, this will end on April 6.
this? It’s technically two lines, although it’s actually across six. Dunno if it can get much shorter… (It’s also not the most readable code…)
Do you think I should decide the winner, or let y’all vote?
Definitely should let the community vote, it’s more fair this way.
I’ll open voting on April 6!
Added a whole bunch more stats to mine for fun
Eh, I think I still did better than you because it’s colorful :).
Is that a challenge? (View updated repl
I guess so, I still have less characters than you though…
Only by ~200 chars, and a lot of that’s probably the text that describes the extra features.
Well, sure the features are nice (and will count to the number of features), they are gimmicks and aren’t really useful in a real-world scenario.