<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/75763>75763</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [clang-format] makes newline wrong when handling JS code 
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang-format
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          LanXSHJ
      </td>
    </tr>
</table>

<pre>
    when formatting:
```javascript
const item0 = oneArray[0]
const item1 = oneArray[1]
```

it gets:
```javascript
const item0 = oneArray[0] const item1 = oneArray[1]
```

if remove `const` modifier or add a `;`, clang-format works fine.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJykUk2P2yAQ_TX4MorFh3GcA4ekllWtettLrxiPbXYxRIAT7b-v7Ky27V4joUFo3sy84T2dkp08oiLyQmRb6DXPIapf2v9-_flS9GH4UPcZPYwhLjpn6ycizoS2hJ5JTR_nTd90MtFe8yNhgk8ZbMaFAhEtBI_nGPUHkRdKZPsdxL6D2Bfoa8Tnc482w4Q5Pc0DnqAwQsQl3BBITfc2pKawhMGOFiOECHoYQG9ZIi5b5D_AOO2nw-Mj4R7ie4LReiyLQYnhJE66QMWOlDf1SYi6mBU2KGQtGiOYZGONPWO60Vz2jRkNjqywilMuGGcNFUwKWR6Hqqe1EfJUYW-qilQUF21d6dxtKUOcCpvSiuooj7UonO7RpV16zv9lRzjfzBDVVnbo1ymRijqbcvrbKNvsdtv8VyhbWPQ7JvB4d9Yj3GPwE-wWmrUfnPUTvLyCCQNCsUan5pyvu5a8I7ybbJ7XvjRhIbzbZn1eh2sMb2gy4d2-QSK825f4EwAA__9zQdZW">