0
How to fix the coad ? HINT: escape single quote in between string
12 Antworten
+ 4
#1—2 ☺️
console.log( ' I\'m learning "JavaScript" ' );
+ 3
Jenjirala Vijay
In response to code from Vasiliy
Did you remove #2 from the code.
I ran it without a problem.
Also, the code he showed you is an easy way to avoid having to use the escape character, and it makes the code easier to read.
That's why he showed that option.
We both understand that you needed the escape character \ for the answer in your first code
+ 2
console.log('I\'m learning JavaScript');
I hope this is not homework
+ 2
Jenjirala Vijay
Thanks for your honesty.
😁👍
I hope the answer given helps you
+ 2
jenjirala vijay means badly tried
+ 2
It would be helpful to show exactly what you have tried (we can't see it from your code)
And remember that you can always go back and review the previous lessons of the course
+ 2
Either you can simply close the string in double quotes or you can use \ before single quotation like :- 'I\'m learning JavaScript');
+ 1
This is a practice problem but I have tried lot time but I didn't get answers that's why I post this
+ 1
Yes 😄😄
+ 1
I have tried vasiliy but syntax error shown😢😢
0
And also Escape the single quote inside the string.
- 1
Zuxx