Understanding "response = response.rt == null ? info : response;" #1650
-
I'm building my own plugin where, among other things, I want to record each key press (rt, key) while someone is typing. Looking through all the plugins I imagined that
I'm left baffled by the Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
The awesome tutorial video (which I hadn't watched entirely yet) obviously shows that the code above is not necessary for what I want to achieve: An answer to understand what is happening would still be appreciated though :) |
Beta Was this translation helpful? Give feedback.
-
Hi @SHogenboom. I moved this over to Discussion from Issues. response = response.rt == null ? info : response; This is a shorthand for an |
Beta Was this translation helpful? Give feedback.
Hi @SHogenboom. I moved this over to Discussion from Issues.
This is a shorthand for an
if... else
statement. It's called the ternary operator. You can learn more about it here.