Javascript - how to bandwagon functions and change their purpose after each call?

不羁岁月 提交于 2019-12-05 20:22:16

First of all congrats on what you are doing. It is a bit of insane, but it's almost brilliant.

Question 1:

I do not know how you could do this. I've spent some time thinking about the same principle.

Question 2:

Your first example doesn't work because the first call for a it is actually a( "2 * 2 = " + x ) where x would be the second call, so when the first a is called you get a NaN because you give it a String

Question 3:

Similar projects? Hmm let me think... I guess everybody has it's own project for something like this, because the code is visible. Actual sources i do not know.

Proposal:

You could consider that square 2D matrix a 3D Rubik's Cube this way you could shuffle it and solve it. The interesting part is that you can combine that a series of moves to actually be a big function for doing something. Anyway probably the best solution for this kind of things IMHO would be to duplicate and then erase the main objects of the JS language and store it in a complex graph inside a anonymous function where nobody can enter to mess around, as for the code to be unreadable, well i think this is an ART.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!