Dealing with Thymeleaf JavaScript Ampersand &

<script type="text/javascript" th:inline="javascript">
var a =b = true;
/*<![CDATA[*/
if(a && b){
    alert('Yea');
}/*]]>*/
</script>

Source: java – Thymeleaf: How to use boolean operator in JavaScript using Thymeleaf – Stack Overflow