This is more bad documentation from Azure, the article does indeed tell you to create an AppSetting and then the code tells you to retrieve a ConnectionString.
The alternative fix is to store the details as a ConnectionString and leave the code as is: