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 Antworten
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