Why using the word "append" in 16 "using strings in lists in functions"


#1

Hi!

This part of the tutorial has got me crazy yesterday. Do you know why the instruction say "Iterate through the words list and append each word to result."

Did they type this just to "trick" us to believe that the append-method should've been used? Since the append method doesn't work in this task?

"you can't append strings, only lists. The exercise requires you to += to extend the string. The wording of the exercise is confusing, for it asks you to append the words to the string - but good question, I experienced difficulty on the same task."


#2

@storken37,
When they are writing appending
they were thinking in the sense of string concatenation

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/concat

Also look under column =Methods=


#3

i was also deeply annoyed by that.


#4

I actually think this is a good excercise.

Having said that, thank you for posting your question and solution, otherwise I will still be confusing :slight_smile: