Don't understanding this expression
Good afternoon everyone. I have some problems with the IntersectionObserver API and I am trying to breakdown the problems into small spices. Here is a question regarding to the JavaScript, in the following line of codes, I guess it a kind of if-statement, but I can't convert it into typical if-statement and understand it. Why there is a question mark? What are they doing? Confusing, can someone please point out what's the original face of it?
https://github.com/mbarker84/smashing-io-header/blob/master/src/index.js#L67
GitHub
smashing-io-header/index.js at master ยท mbarker84/smashing-io-header
Contribute to mbarker84/smashing-io-header development by creating an account on GitHub.
2 Replies
it's a ternary operation.
translates to
Thank you, I will check the topic about ternary operation