Please check this JS comment in a multiline template

Looking for a way to add some comments in my JS templates (used in custom-ui) I ran into an issue with a faulty one:

        icon_color: >
          if (state == 'on') return 'purple'; //'red'
          return 'steelblue';

this was of course a single line comment format, as explained in:
https://www.w3schools.com/js/js_comments.asp

since I use the yaml multi-line style with the >, I would need the comments indicated by

/* etc etc etc
  etc etc etc */

I am not sure this would be valid in Yaml for the template above in the first place, but secondly not sure how to do in that case:

        icon_color: >
          if (state == 'on') return 'purple'; /* 'red' */
          return 'steelblue';

would be ok?

thanks if you could have a look