Connect Javascript strings (2)
`
). You can inject a JavaScript expression using ${expression}
— e.g. ${1+1}
which would insert 2 into the string.Adjust the code below such that the value of the variable word is inserted into the string of the variable sentence. Run the code to see if the complete sentence is logged.
Get a premium membership to access this content: