Error: ‘deb [arch=amd64] bionic stable’ invalid

I was following instructions directly from this link here

to try to install Docker CE on virtual box running Ubuntu 18.04 LTS, but I get the following error:

Error: 'deb [arch=amd64]  bionic  stable' invalid

The exact command I followed is:

$ sudo add-apt-repository 
   "deb [arch=amd64] 
   $(lsb_release -cs) 

which was provided in the link above. How can I fix this error?

Source: StackOverflow