coffeescript - If...then in JSX for Javascript -


i've been writing coffeescript/cjsx , valid syntax:

<div>    <input type={if @state.name == "test" "checkbox"}/> </div> 

how do same plain javascript? there no if...then clause , don't think can inline if checks can in coffee?

taking answer how write inline if statement in javascript?

you can use syntax 10 < 11 ? : that ? then , : else.


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -