Conditional Operator and prop value jQuery

It has the form of: condition ? value-if-true : value-if-false

My code

$('#youselect').html('text (stuffvar ? 'Yes and how paste here a myid.prop('checked'); value?' : 'No') text');

Got unexpected string error with '+myid.prop('checked');+' .

Thanks!

I’m not sure what your question is.

I got unexpected string. So I want get a prop checked value with myid.prop(‘checked’); but i cant paste there as text and with two ‘’ not work.

Seems like you have not posted the full line of code. If you have the project on Codepen, we can look at the full code and probably give you better feedback.