Error when submitting

hi there all, i get the following error when i want to submit step 42 in learning basic javascript by building a roleplaying game:

“SyntaxError: unknown: Support for the experimental syntax ‘jsx’ isn’t currently enabled (28:1): 26 | console.log(“Going to store.”); 27 | } > 28 |

button 1Demo content

| ^ 29 | const info = document.querySelector(”#info"); 30 | info.innerText = “Hello World”; 31 | Add @babel/preset-react (babel/packages/babel-preset-react at main · babel/babel · GitHub) to the ‘presets’ section of your Babel config to enable transformation. If you want to leave it as-is, add @babel/plugin-syntax-jsx (babel/packages/babel-plugin-syntax-jsx at main · babel/babel · GitHub) to the ‘plugins’ section to enable parsing".

And it doesn’t submit after i press submit:
what do i do to fix this.
thank you

Could you share your code?

1 Like

ok sanity:

function goStore() {
  console.log("Going to store.");
  }
  <p  id="info">button1</p> 
const info = document.querySelector("#info"); 
info.innerText = "Buy 10 health (10 gold)";

I’ve edited your code for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').

This isn’t JavaScript, but HTML. The example tries to show the relation between the two.