DEV Community

Discussion on: JavaScript ES6

Collapse
 
cmgustin profile image
Chris Gustin

For the Template String example, the line with the template string needs to be wrapped in back ticks instead of single/double quotes or it won’t parse.

Collapse
 
jamesthomson profile image
James Thomson

Unless you want it to output 'Hello ${name}'😉

Collapse
 
jamesthomson profile image
James Thomson • Edited

The Object.Assign example has a similar issue. object needs to be Object or else it'll throw a reference error. Same with the promise example. 🤦‍♂️ ...In fact, there are a lot of examples here missing closing quotes or with improper casing which will throw errors.

Collapse
 
buddhadebchhetri profile image
Buddhadeb Chhetri

Thanks for the correction I will fixed that.😊

Thread Thread
 
cmgustin profile image
Chris Gustin

I think the multi-line string example needs back ticks too, and the example code string is showing for me as one line.

Thanks for editing those other examples.

Thread Thread
 
buddhadebchhetri profile image
Buddhadeb Chhetri

Thanks for the correction:)

Some comments have been hidden by the post's author - find out more