DEV Community

Discussion on: Underestanding Types of Quotes In JavaScript and Their Uses.

Collapse
 
octaneinteractive profile image
Wayne Smallman • Edited

I remember the first time I came across Javascript variables and it was welcome to see something similar to what PHP does.

As an example, in PHP single and double quotes have different behaviours, in that: "Hello $userName!" would render the variable, whereas: 'Hello $userName!' would — if I'm remembering this correct — render the variable name as its string value:

Hello $userName!

Collapse
 
kene_nwobodo profile image
Kenechukwu Nwobodo

Yeah