How to get particular lines string length from DOM element by using javascript/jquery

Clash Royale CLAN TAG#URR8PPPHow to get particular lines string length from DOM element by using javascript/jquery
I have a string like this (hello how are you? hello how are you? hello how are you? hello how are you?). I am rendering this string in DOM element with 80px of width.
I am counting number of string lines by using below code. Now it returns number of lines displayed in UI.
Now i need to count second line's string length. How to get second line's string length? is there any possible solution to do this?
function numberOfLines() {
var divHeight = document.getElementById('content').offsetHeight
var lineHeight = parseInt(document.getElementById('content').style.lineHeight);
var lines = divHeight / lineHeight;
alert("Lines: " + Math.round(lines));
}
<body onload="numberOfLines();">
<div id="content" style="width: 80px; line-height: 20px">
hello how are you? hello how are you? hello how are you? hello how are you?
</div>
</body>
1st line string is "hello how" and 2nd line string is "are you?" and vise versa.
– Rajkumar A
1 min ago
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
What do you mean by "second lines"?
– Cata John
1 hour ago