I’ve tried these quizzes so many times and never can pass them because I have no idea where this information was covered. I’ve repeated the basic intro course over and over and over and I don’t get this at all. Can anyone please show me where this is in the lesson because I don’t know how to do this. I know basic concatenation like ‘one’ + ‘two’ what is this and why are there so many options?
Hello @byte5723385929. The reason there are so many options in the multiple choices is because this is a quiz designed to get you thinking. Also, the way concatenation (joining strings) works is that you can have multiple strings and variables (that contain strings):
let word1 = "are"; let punctuation = "?"; console.log("Hello" + " how " + word1 + " you" + punctuation);
>>"Hello how are you?"
From the screenshot, you have used most of the correct symbols, however, equal signs(`=) do not form part of concatenation.
I hope this helps!
Thank you for the reply and example, it makes sense. What makes no sense is all the spaces/blanks in the example in the quiz. I remember learning about the strings the way you showed but nothing like this quiz. I just threw in things to the quiz so I don’t know the = from anything else because I don’t understand the example in the quiz and I can’t ANYTHING online that teaches it
By spaces, do you mean the places to fill in the answers? If so, then think about it another way. If you were asked to do this task in real life (not in the quiz, but you had to code everything yourself), how would you go about doing it? Code that somewhere else (if you want an online compiler, repl is good), and then see how your code matches that of the quiz, and then go from there.
This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.