Jump to content

Concatenate with quotation marks


Recommended Posts

var colour = blue ;

Will be treated as variable colour equaling  variable blue, so it should be

var colour = 'blue';

Depending on what, where, how it is used

fill: 'colour', 

In most cases would be used as

'fill: '+colour+', '

If you need quotes then it would be

'fill: " '+colour+' ", '


"fill: ' "+colour+" ', "

Edited by dsonesuk
  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...