سؤال

If I wanted to store the following string literal in a variable :

ab'c'd

Then what are the various ways to do it, using a single quote (') and/or a back-tick (`) ?

هل كانت مفيدة؟

المحلول

You have two choices:

Single Quotes:

   var = 'ab''c''d'.

Back Tick:

   var = `ab'c'd`.

Using the Back Tick is the simpler solution, assuming you're only concerned about single quotes.

نصائح أخرى

Quotes should be usually "quoted" with backticks.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top