How show the content let text: string in tag
using typescript and getElementById?Code index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script src="./index.js"></script>
</head>
<body>
<h1>Exercice typescript</h1>
<p id="text">Text: </p>
</body>
</html>
Code index.ts
let text: string = 'Exercice typescript';
let textAuth = document.getElementById("text") as HTMLElement | null