2 ms·
I agree. Reading YDKJS book helped. The trick is to realise "this" is like another argument to the function. It varies by context, and will be set to the creat
by bbcbasic 10y ago
I agree. Reading YDKJS book helped. The trick is to realise "this" is like another argument to the function.
It varies by context, and will be set to the created object if new is used, set to global otherwise. You can also use the call function I think to set to something specific.
Anyway none of it really makes any deep sense to me, just a load of arbitrary features and traps.
FP like Haskell have a deep structure based in theory and maths, so although harder to make sense of initially, one you get it you don't forget it.