<!DOCTYPE html>
<html xmlns:th="https://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<script th:inline="javascript">
    /*<![CDATA[*/

    let size = /*[[${SIZE}]]*/ '';
    console.log(size)
    for(let i=0; i<size; i++)
    {
         let name =  [[${A1}]]

         console.log(name);
    }

    /*]]>*/
</script>

    <h3 th:text="${A1}">  </h3>
    <h3 th:text="${A2}">  </h3>
    <h3 th:text="${A3}">  </h3>


</body>
</html>