<sectionid="description"> Los dos últimos desafíos cubren los aspectos básicos de mostrar datos dinámicamente con D3 usando los métodos <code>data()</code> y <code>enter()</code> . Estos métodos toman un conjunto de datos y, junto con el método <code>append()</code> , crean un nuevo elemento DOM para cada entrada en el conjunto de datos. En el desafío anterior, creó un nuevo elemento <code>h2</code> para cada elemento en la matriz del <code>dataset</code> , pero todos contenían el mismo texto, "Título nuevo". Esto se debe a que no ha utilizado los datos vinculados a cada uno de los elementos <code>h2</code> . El método D3 <code>text()</code> puede tomar una cadena o una función de devolución de llamada como un argumento: <code>selection.text((d) => d)</code> En el ejemplo anterior, el parámetro <code>d</code> refiere a una sola entrada en el conjunto de datos que una selección está vinculada a. Utilizando el ejemplo actual como contexto, el primer elemento <code>h2</code> está vinculado a 12, el segundo elemento <code>h2</code> está vinculado a 31, el tercer elemento <code>h2</code> está vinculado a 22, y así sucesivamente. </section>
<sectionid="instructions"> Cambie el método <code>text()</code> para que cada elemento <code>h2</code> muestre el valor correspondiente de la matriz del <code>dataset</code> con un solo espacio y "USD". Por ejemplo, el primer encabezado debe ser "12 USD". </section>