1.8 KiB
		
	
	
	
	
	
	
	
			
		
		
	
	
			1.8 KiB
		
	
	
	
	
	
	
	
id, title, required, challengeType, videoUrl, localeTitle
| id | title | required | challengeType | videoUrl | localeTitle | |||
|---|---|---|---|---|---|---|---|---|
| 587d7fa7367417b2b2512bc6 | Add Inline Styling to Elements | 
 | 6 | Añadir estilo en línea a los elementos | 
Description
style() . El método style() toma un par clave-valor separado por comas como argumento. Aquí hay un ejemplo para establecer el color del texto de la selección en azul: selection.style("color","blue"); Instructions
style() al código en el editor para hacer que todo el texto mostrado tenga una font-family de verdana . Tests
tests:
  - text: Tus elementos <code>h2</code> deben tener una <code>font-family</code> de verdana.
    testString: 'assert($("h2").css("font-family") == "verdana", "Your <code>h2</code> elements should have a <code>font-family</code> of verdana.");'
  - text: Su código debe utilizar el método <code>style()</code> .
    testString: 'assert(code.match(/\.style/g), "Your code should use the <code>style()</code> method.");'
Challenge Seed
<body>
  <script>
    const dataset = [12, 31, 22, 17, 25, 18, 29, 14, 9];
    d3.select("body").selectAll("h2")
      .data(dataset)
      .enter()
      .append("h2")
      .text((d) => (d + " USD"))
      // Add your code below this line
      // Add your code above this line
  </script>
</body>
Solution
// solution required