<!DOCTYPE html>
<html lang="pt-br">
<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>Média</title>
</head>
<body>
<script>
let media;
media = ((200+100+300+400)/4)
document.write("A média de gastos é: " + media);
</script>
</body>
</html>