Which of the following options checks that city is neither Chicago nor Dallas?
Choose one answer.
a. if !(city == "Chicago" || city == "Dallas")
b. if (city != "Chicago" || city == "Dallas")
c. if !(city == "Chicago" && city == "Dallas")
d. if (city != "Chicago" || city != "Dallas")
Which one of the following statements can be used to extract the last 10 characters from the string variable str?
Choose one answer.
a. str.substr(str.length() - 10, 10)
b. str.substr(10, 10)
c. str.substr(0, 10)
d. str.substr(str.length() - 9, 10)