Earlier quoted context omitted.
It does, see the "fill" step: «So now we have acquired the following extra characters: c,o,v,(,),{,[,],}, .».
Those characters are only inside a string, not as executable code.
A Javascript journey with only six characters
51–60 of 123 posts
Re: A Javascript journey with only six characters
#52Does anyone know a good sandboxing technology to execute user written javascript in a safe way? (like, on other user machines or on the server)? I have some ideas like "learn programming" that would benefit from this immensely.
Used it a few years ago. It was a little finnicky to get working right but I was impressed at the time. No idea where the project is at nowadays.
Re: A Javascript journey with only six characters
#53Earlier quoted context omitted.
ES6 lets you define functions like a => a * 2 Or (a, b, c) => a * b ^ c
That's succinct, but less clear than the Ruby version, imo, as you don't have any scope indicators required for the function body. JS: let f = (a,b,c) => a * b ^ c; f(2,3,4); vs. Ruby: f = ->(a,b,c) { a * b ^ c } f.(2,3,4) Ruby's shorter and clearer. But, when you use the Ruby lambda more than once in the code, you lose the brevity advantage, because of the "extra" dot. But, in Ruby I use methods more than lambdas, w…
Re: A Javascript journey with only six characters
#54Earlier quoted context omitted.
That's succinct, but less clear than the Ruby version, imo, as you don't have any scope indicators required for the function body. JS: let f = (a,b,c) => a * b ^ c; f(2,3,4); vs. Ruby: f = ->(a,b,c) { a * b ^ c } f.(2,3,4) Ruby's shorter and clearer. But, when you use the Ruby lambda more than once in the code, you lose the brevity advantage, because of the "extra" dot. But, in Ruby I use methods more than lambdas, w…
None is preventing you from writing let f = (a,b,c) => {a * b ^ c}; in JS
Re: A Javascript journey with only six characters
#55Why do I feel like I have read this article a few years ago? I remember it, but it has 2016...
Re: A Javascript journey with only six characters
#56Does anyone know a good sandboxing technology to execute user written javascript in a safe way? (like, on other user machines or on the server)? I have some ideas like "learn programming" that would benefit from this immensely.
Re: A Javascript journey with only six characters
#57Re: A Javascript journey with only six characters
#58The article does not explain how it gets the {}, which is used to get the Object constructor string. Other than that it's very clear.
Re: A Javascript journey with only six characters
#59Why do I feel like I have read this article a few years ago? I remember it, but it has 2016...
Because you did. I came to the comments wondering if this was a shameless ripoff of the original or a re-post from the same author.