Am just starting out with Livescript and want to know how the scope works.
Are the any good example/docs that show all scope symbols and usage. Symbols like:
- @
- -> vs ~>
- self
- :=
Edit
The problem I face:
This ethercalc code: line 103. I want to insert a call to a Java script function, i.e. to this send email code.
http://livescript.net documents all that functionality.
@
meansthis
.@prop
meansthis.prop
->
creates a function, it meansfunction(){}
-> blah()
isfunction(){ return blah(); }
(a, b) -> foo
isfunction(a, b) { return foo; }
self
is nothing special, just the name of a variable. Often set tothis
of an upper scope.:=
means "reassign a variable" - it must already exist. It does not create a new variable. Check out http://livescript.net/#introduction for more info