TimohaP,
<!DOCTYPE HTML>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
</head>
<body>
<textarea>
Строка 1
Строка 2
</textarea>
<script>
var a = document.querySelector('textarea').value.split(/[\r\n]+/) ;
alert(a[a.length-2])
</script>
</body>
</html>