Javascript Primer Quiz - Strings
How many of these are a string in JavaScript?
'example'99.99"example"'99.99'example
let answer
tests({
'answer is correct': (t) => {
t.isEqual(answer, 3, `${answer === undefined ? "You haven't submitted an answer yet" : "Not quite, try again"}`)
}
})
Which one of these is NOT appropriate to store as a string?
- A song lyric
- A person's age
- An email address
- A person's name
let answer
tests({
'answer is correct': (t) => {
t.isEqual(answer, 2, `${answer === undefined ? "You haven't submitted an answer yet" : "Not quite, try again"}`)
}
})
What is the result of the following code:
"Happy " + "Birthday!"
Happy Birthday!"Happy birthday!""HappyBirthday!""Happy Birthday!"
let answer
tests({
'answer is correct': (t) => {
t.isEqual(answer, 4, `${answer === undefined ? "You haven't submitted an answer yet" : "Not quite, try again"}`)
}
})
Onwards!
You've completed the Strings section of the quiz! Now, click here to continue to the Booleans section.