Highlighted

JavaScript variables don't work for me.

Community Beginner ,
Jun 17, 2020

Copy link to clipboard

Copied

When I start any JavaScript code, inside of one HTML (<script></script>) or in a linked document .js

If I use let, show me this message:

ERROR: Parsing error: Unexpected token nombre.

 

If I use const, this is the message:

ERROR: Parsing error: The keyword 'const' is reserved.

 

For example:

let person1 = 'Charlie';

const valor1 = 5;

 

Console log also doesn't work:
Uncaught SyntaxError: missing } after property listmain.js:5:41note: { opened at line 1, column 14

 

Uncaught ReferenceError: person1 is not defined

    <anonymous> debugger eval code:1

debugger eval code:1:1

 

Don't have any relation about where I declare the variable or how, just avoid me to use let or const. I have Dreamweaver updated this morning. Anybody know about how to fix this??


Thanks!

Views

310

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

JavaScript variables don't work for me.

Community Beginner ,
Jun 17, 2020

Copy link to clipboard

Copied

When I start any JavaScript code, inside of one HTML (<script></script>) or in a linked document .js

If I use let, show me this message:

ERROR: Parsing error: Unexpected token nombre.

 

If I use const, this is the message:

ERROR: Parsing error: The keyword 'const' is reserved.

 

For example:

let person1 = 'Charlie';

const valor1 = 5;

 

Console log also doesn't work:
Uncaught SyntaxError: missing } after property listmain.js:5:41note: { opened at line 1, column 14

 

Uncaught ReferenceError: person1 is not defined

    <anonymous> debugger eval code:1

debugger eval code:1:1

 

Don't have any relation about where I declare the variable or how, just avoid me to use let or const. I have Dreamweaver updated this morning. Anybody know about how to fix this??


Thanks!

Views

311

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jun 17, 2020 0
Adobe Community Professional ,
Jun 17, 2020

Copy link to clipboard

Copied

To show what another IDE shows

 

BenPleysier_0-1592396267579.png

 

This makes me feel good because I know more than a dumb script editor.

 


Ben

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 17, 2020 0
LEGEND ,
Jun 17, 2020

Copy link to clipboard

Copied

Yeah, the ide recognises const but obviously does not know what it should be used for. Maybe its just putting it out there so you know it knows const is a reserved keyword for the fun of it.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 17, 2020 0
Community Beginner ,
Jun 18, 2020

Copy link to clipboard

Copied

Nothing. Don't have any relation with brackets, funtions or anything. Any JavaScript wrote in anywhere, as simple as 1 line with: const = 1 or let = 1 this doesn't work. Only allow me to use "var", that is a problem precisely for that, I can't use local variables unmodifiable or inside of funtions due it.

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 18, 2020 0
LEGEND ,
Jun 17, 2020

Copy link to clipboard

Copied

Is there more to your javascript code than just the the let and const variable declarations as the console message suggests you are  missing a closing } bracket

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 17, 2020 0
Adobe Employee ,
Jun 17, 2020

Copy link to clipboard

Copied

Hi Rennoib

 

Thanks for reporting the issue, could you please mention the Dreamweaver version you are using.

 

Regards

Dreamweaver Team

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 17, 2020 0
Community Beginner ,
Jun 18, 2020

Copy link to clipboard

Copied

Thanks for answer. The last that I could update. Also, sometimes, some keyboard shortcut like "Ctrl" + "/" don't work correctly until I reboot Adobe DreamWeaver. This problem only happen inside of this software.


Version: 20.2

Build 15263

 

On Windows 10.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 18, 2020 0
Community Beginner ,
Jun 18, 2020

Copy link to clipboard

Copied

So sadly and after don't find any solution. Finally I abandoned my try to learn and code JavaScript directly on DreamWeaver.  Literally is impossible to me work if for any cause, the variables don't works (I detected that also var cause me problems). And all this problems disappear magically when I use the same code on another software to coding.

I hope that they fix it and also PHP possibles failures, because at side that the focus of this software in Front-End and work directly over visual design. If you want to work decently on a web or do something more professional, you need be avaible to execute at last, this two coding languagues.

Thanks all for answer me and try to help me!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 18, 2020 0
Adobe Employee ,
Jun 22, 2020

Copy link to clipboard

Copied

Hi,

 

Can you please share a screenshot of the html file where you have used your code mentioned above in <script> tag and also the screenshot of the error which you are facing.

 

Regards

Dreamweaver Team

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 22, 2020 0
Rennoib LATEST
Community Beginner ,
Jun 24, 2020

Copy link to clipboard

Copied

I send you captures. This web work perfectly in Visual Studio Code, but make a lot of errors in DreamWeaver. Happen with all JS pages or working inside of HTML with <script>.

 

If is neccesary, I can make a shorter page, because most of the pages where I use, was for learn using the console and I don't saved them.

 

Example of const errorExample of const errorExample of let errorExample of let errorIndex documentIndex document

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 24, 2020 0