The issue is because you're giving the variable the same name as the class.
Note that by standard JS naming convention, classes should have upper pascal case names. Variables should have lower pascal case. Following these rules avoids the issue:
class ConnectFour {
constructor(selector) {
console.log(selector);
}
}
$(document).ready(function() {
const connectFour = new ConnectFour('hi');
});
<div id="htmlConnectFour"></div>
<script src="https://code.jquery.com/jquery-3.5.1.js" integrity="sha256-QWo7LDvxbWT2tbbQ97B53yJnYU3WhH/C8ycbRAkjPDc=" crossorigin="anonymous"></script>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…