Build a Roman Numeral Converter Project - Build a Roman Numeral Converter

Tell us what’s happening:

Getting stuck on instruction 4 and also I am getting a “ReferenceError: ducument is not defined”. not sure what this means.

for instruction #4, when clicking on convert the convert button doesn’t do anything. No message ,no nothing . I am not sure whats happening.

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title>Document</title>
</head>
<body>
<input id="number">
<button id="convert-btn">Convert</button>
<div id="output"></div>
<script src="./script.js"></script>
</body>
</html>
/* file: styles.css */

/* file: script.js */
const input = ducument.getElementById("number")
const convert = ducument.getElementById("convert-btn")
const output = ducument.getElementById("output")

const numeral = [
   ['M', 1000],
    ['CM', 900],
    ['D', 500],
    ['CD', 400],
    ['C', 100],
    ['XC', 90],
    ['L', 50],
    ['XL', 40],
    ['X', 10],
    ['IX', 9],
    ['V', 5],
    ['IV', 4],
    ['I', 1]
 ]

input.addEventListener("keydown", (e) => {
  if (e.key === "Enter") {
    convert.click()
  }
})

button.addEventListener("click", () => {
  const value = input.value;
  if (!value) {
    output.innerText = "Please enter a valid number"
  }
})

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:138.0) Gecko/20100101 Firefox/138.0

Challenge Information:

Build a Roman Numeral Converter Project - Build a Roman Numeral Converter

console.log() any of these…they all have the same typo.

yeah I just saw my mistake after I had posted this lol :sweat_smile:

Since you said you didn’t know what the reference error meant, you might want to look over this video/transcript in the Full Stack Developer curriculum.