fork download
  1. let theorem = 'Pythagorean theorem';
  2.  
  3. let a = 5;
  4. let b = 8;
  5.  
  6. let myString = `Using ${"*"}, we can work out that that if the two shortest sides of a right-angled triangle have lengths of ${Math.pow(a, 2)} and ${Math.pow(b, 2)}, the length of the hypotenuse is ${Math.pow(a, 2) + Math.pow(b, 2)}.`;
  7.  
  8. // Don't edit the code below here!
  9.  
  10. section.innerHTML = ' ';
  11. let para1 = document.createElement('p');
  12. para1.textContent = myString;
  13.  
  14. section.appendChild(para1);
  15.  
Runtime error #stdin #stdout #stderr 0.02s 17032KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
prog.js:10:1 ReferenceError: section is not defined
Stack:
  @prog.js:10:1