190k views
18 votes
Jax is creating a variable for a book title. What is the correct format to use?

bookTitle = "Sunrise Over Texas"
book Title = Sunrise Over Texas"
!bookTitle = "Sunrise Over Texas"
bookTitle = Sunrise Over Texas

User Fibericon
by
6.1k points

2 Answers

8 votes

Answer:

Option 1

Step-by-step explanation:

User Everick
by
5.6k points
1 vote

Answer:

The correct answer is:

Option 1: bookTitle = "Sunrise Over Texas"

Step-by-step explanation:

In every language, there are some predefined rules for naming variables.

Some common ones are:

  • There should be no space in variable name.
  • A variable name cannot start with a special character

And as jax has to store the title name of the book, it might consist of multiple words which means that the data type will be string. A string is always written in inverted commas.

So according to the rules and string data type, the correct answer is:

Option 1: bookTitle = "Sunrise Over Texas"

User EricBoersma
by
6.0k points