Definition of fun() #676
Answered
by
jeapostrophe
lornawanjiru
asked this question in
Q&A
-
const Player = { I would really appreciate if you could explain about the fun method. is it inbuilt? how do we define methods in reach.? |
Beta Was this translation helpful? Give feedback.
Answered by
jeapostrophe
Mar 11, 2022
Replies: 1 comment
-
You can define a function just like normal JavaScript --- https://docs.reach.sh/rsh/compute/#p_15 OR https://docs.reach.sh/rsh/compute/#arrow-expression |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
jeapostrophe
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Fun
is a type that describes a function, in the sample you include, it is describing something in the interface --- https://docs.reach.sh/rsh/compute/#rsh_FunYou can define a function just like normal JavaScript --- https://docs.reach.sh/rsh/compute/#p_15 OR https://docs.reach.sh/rsh/compute/#arrow-expression