I have a form. If you fill in the form, the data must be placed in the constant USERS with (vanilla) javascript. Can somebody help me, please?
It is also intended that the CONST USERS will be shown in the div 'show', but doesn't have to.
My Code:
<!DOCTYPE html>
<head>
<title>Users</title>
</head>
<body>
<main>
<form>
<label for="ordername">Name:</label>
<input type="text" id="name" name="name"/>
<label for="age">Age:</label>
<input type="number" id="age" name="age"/>
<input type="submit" value="submit" class="submit"/>
</form>
<div class="show">
</div>
</main>
<script>
const USERS = [
{
name: Brit,
age: 45,
},
{
name: John,
age: 55,
}];
</script>
</body>
</html>