Skip to main content
January 19, 2026
Answered

Error in the colors of my JavaScript color though the code is correct

  • January 19, 2026
  • 1 reply
  • 137 views

Hi there. DreamWeaver is visually rendering my JavaScript code incorrectly. I put the same code in JSFiddle online and the code is correct.

 

I spent a lot of time trying to find out what was wrong till I noticed there is a bug there. What should I do? Is this a bug?

 

I think it has to do with bracket pairs some lines up that are not pairing correctly! See the prints I attached.

Thanks.

Correct answer L e n a

What you’re seeing is not an issue with your JavaScript itself, but with Dreamweaver’s code editor syntax highlighting.

 

In particular, the editor currently struggles with template literals (strings wrapped in backticks `), especially when combined with arrow functions and embedded expressions. A line like:

 

const cartText = cart.map(item => `${item.id} x ${item.quantity}`).join("\n");

 

is perfectly valid JavaScript, which is why it works correctly in JSFiddle and in modern editors. However, Dreamweaver’s editor may misinterpret the backticks and lose track of bracket pairs, which then breaks the visual formatting and colouring of the code.

 

This is a known limitation of the editor, and the development team has already been informed. At the moment, it’s mainly a visual issue: the code still runs correctly, but the editor display becomes confusing.

 

The current workaround is to edit JavaScript files in an external editor such as VS Code or Sublime Text, and configure Dreamweaver to use it via Preferences -> File Types / Editors. Many developers use this setup for modern JavaScript syntax.

 

So to answer your question: your code is fine, and this is not a logic or syntax error on your side, but an editor limitation.

Hope this helps clarify what’s going on.

1 reply

L e n aCommunity ExpertCorrect answer
Community Expert
January 20, 2026

What you’re seeing is not an issue with your JavaScript itself, but with Dreamweaver’s code editor syntax highlighting.

 

In particular, the editor currently struggles with template literals (strings wrapped in backticks `), especially when combined with arrow functions and embedded expressions. A line like:

 

const cartText = cart.map(item => `${item.id} x ${item.quantity}`).join("\n");

 

is perfectly valid JavaScript, which is why it works correctly in JSFiddle and in modern editors. However, Dreamweaver’s editor may misinterpret the backticks and lose track of bracket pairs, which then breaks the visual formatting and colouring of the code.

 

This is a known limitation of the editor, and the development team has already been informed. At the moment, it’s mainly a visual issue: the code still runs correctly, but the editor display becomes confusing.

 

The current workaround is to edit JavaScript files in an external editor such as VS Code or Sublime Text, and configure Dreamweaver to use it via Preferences -> File Types / Editors. Many developers use this setup for modern JavaScript syntax.

 

So to answer your question: your code is fine, and this is not a logic or syntax error on your side, but an editor limitation.

Hope this helps clarify what’s going on.

January 20, 2026

Perfectly explained. Thank you! My AI helper told me the same, but I just wanted to be sure. Thank you so much. I downloaded Sublime Text. Any good one to just use online JSFiddle, I guess?

Nancy OShea
Community Expert
Community Expert
January 21, 2026

As a companion app, try Visual Studio Code alongside Dreamweaver.  VS Code has good support for working with JavaScript plus optional extensions if you need them. 

 

Nancy O'Shea— Product User & Community Expert