DEV Community

loading...

Discussion on: Node Vs Deno

Collapse
pvcodes profile image
Pranjal Verma

Hey guys, I have been working on my very first APIs project and in that project I'm making a "QUIZ APP", where from an API. I have been taking 10 question and giving them multiple choices and at end they will be getting scored. I'm using NODE.JS, EXPRESS, REQUEST, EJS for the app.

The problem comes here when i get a string from API. I change it to an object using JSON.parse() and sending it to EJS files and then displayed. but when their are symbols in question like ", ' , and more they are displayed as &139; , " like that.

                      HOW DO I FIX THAT.
Collapse
chandra profile image
Chandra Prakash Tiwari Author

Actually, I didn't get the complete query.
But it seems you are facing challenges in using ' and "
You can use string in either " " or ' ' . Keep in mind you can't use double inverted commas inside double inverted commas , but you can use single inside double inverted commas and vice versa.

Eg " Ram is a 'SDE' at google."
This is correct.
You can us, backticks, single and double inverted commas.
Its simple but I can't explain complety here.

Collapse
pvcodes profile image
Pranjal Verma

Ek API se main data lera hu

Thread Thread
pvcodes profile image
Pranjal Verma

Usko json parse krne ke baad bhi " ni aare unke unicodes aare hai

Collapse
pvcodes profile image
Pranjal Verma

No that's no the case