NickyNick321
NickyNick321

Reputation: 233

How to put quotes around a string that has quotes?

Making a game in spritekit and I have an array of famous historical quotations. I'm having trouble adding the quotes because the syntax requires me to use quotes. For example, I want to do something like ""apple"", ""orange"", but it won't let me use double quotations.

Upvotes: 0

Views: 135

Answers (1)

Bannings
Bannings

Reputation: 10479

Try this:

let fruit = "\"apple\""

Upvotes: 2

Related Questions