Extract only 300 characters from a body of text and append it with '...', can someone explain why? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

Extract only 300 characters from a body of text and append it with '...', can someone explain why?

Hello, This code is able to extract only 300 characters from a body of text and append it with '...', can some explain why? p.textContent = `${movie.description}...` I am a newbie learning JavaScript, any advise would be appreciated! regards Ben

8th Mar 2020, 2:43 PM
Ben
2 Respostas
0
No, the code you showed, append "..." to string with any length of it, it won't extract 300 characters from body of text.
8th Mar 2020, 2:48 PM
CalviÕ²
CalviÕ² - avatar
0
hi there, i have used the code and it extracts the first 300 characters and appends the rest with ā€œ...ā€. https://code.sololearn.com/WFb9rvRh2GyE/?ref=app
8th Mar 2020, 3:13 PM
Ben