68 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			Markdown
		
	
	
	
	
	
		
		
			
		
	
	
			68 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			Markdown
		
	
	
	
	
	
|   | --- | ||
|  | id: 587d7fa6367417b2b2512bc2 | ||
|  | title: Add Document Elements with D3 | ||
|  | challengeType: 6 | ||
|  | videoUrl: '' | ||
|  | localeTitle: '' | ||
|  | --- | ||
|  | 
 | ||
|  | ## Description
 | ||
|  | undefined | ||
|  | 
 | ||
|  | ## Instructions
 | ||
|  | undefined | ||
|  | 
 | ||
|  | ## Tests
 | ||
|  | <section id='tests'> | ||
|  | 
 | ||
|  | ```yml | ||
|  | tests: | ||
|  |   - text: '' | ||
|  |     testString: 'assert($("body").children("h1").length == 1, "The <code>body</code> should have one <code>h1</code> element.");' | ||
|  |   - text: '' | ||
|  |     testString: 'assert($("h1").text() == "Learning D3", "The <code>h1</code> element should have the text "Learning D3" in it.");' | ||
|  |   - text: '' | ||
|  |     testString: 'assert(code.match(/d3/g), "Your code should access the <code>d3</code> object.");' | ||
|  |   - text: يجب أن تستخدم شفرتك طريقة <code>select</code> . | ||
|  |     testString: 'assert(code.match(/\.select/g), "Your code should use the <code>select</code> method.");' | ||
|  |   - text: يجب أن تستخدم التعليمات البرمجية الخاصة بك أسلوب <code>append</code> . | ||
|  |     testString: 'assert(code.match(/\.append/g), "Your code should use the <code>append</code> method.");' | ||
|  |   - text: يجب أن تستخدم الشفرة طريقة <code>text</code> . | ||
|  |     testString: 'assert(code.match(/\.text/g), "Your code should use the <code>text</code> method.");' | ||
|  | 
 | ||
|  | ``` | ||
|  | 
 | ||
|  | </section> | ||
|  | 
 | ||
|  | ## Challenge Seed
 | ||
|  | <section id='challengeSeed'> | ||
|  | 
 | ||
|  | <div id='html-seed'> | ||
|  | 
 | ||
|  | ```html | ||
|  | <body> | ||
|  |   <script> | ||
|  |     // Add your code below this line | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  |     // Add your code above this line | ||
|  |   </script> | ||
|  | </body> | ||
|  | 
 | ||
|  | ``` | ||
|  | 
 | ||
|  | </div> | ||
|  | 
 | ||
|  | 
 | ||
|  | 
 | ||
|  | </section> | ||
|  | 
 | ||
|  | ## Solution
 | ||
|  | <section id='solution'> | ||
|  | 
 | ||
|  | ```js | ||
|  | // solution required | ||
|  | ``` | ||
|  | </section> |