Doug C. answered 03/14/23
PhD in Education with 15+ Years of Web Design Experience.
Dreamweaver CS6 was released in 2012, and does not have built-in support for the ES6 (ECMAScript **2015**) syntax, which includes the 'let' keyword.
However, you can still use ES6 syntax in Dreamweaver CS6 by configuring it to recognize the new syntax. Here are the steps you can follow:
- Open Dreamweaver CS6 and go to "Edit" -> "Preferences" (or "Dreamweaver" -> "Preferences" on a Mac).
- In the Preferences dialog box, select "Code Format" from the list on the left-hand side.
- In the "Code Format" section, click the "Edit..." button next to the "File Extensions" field.
- In the "Edit File Type" dialog box, select "JavaScript" from the list of file types.
- In the "Edit JavaScript File Type" dialog box, click the "Advanced" tab.
- In the "Advanced" tab, add "let" to the list of keywords under the "Reserved Words" section.
- Click "OK" to close all of the dialog boxes.
After completing these steps, Dreamweaver CS6 should recognize 'let' as a valid keyword and stop giving you syntax errors. Keep in mind, though, that this method only adds support for the 'let' keyword, and does not provide full ES6 support.