sana,
<!DOCTYPE HTML>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
<style type="text/css">
p{
margin: 2px 0px;
border-bottom: #000000 1px groove;
display: table;
}
p:nth-of-type(6n+1){
border-bottom: #FF1493 3px groove;
}
</style>
</head>
<body>
<script>
var movies=new Array("Star Wars: Episode VII - The Force Awakens","Max","Spirited Away","The Hunger Games","Wild");
for(var i=0;i < movies.length;i++)
function listMovies(movies)
{
var result=movies.sort();
return result;
}
document.writeln("<p>Фильмы в алфавитном порядке:<p>");
document.writeln(movies.sort().join('<p>'));
document.writeln("<p>Фильмы в обратном порядке:<p>");
document.writeln(movies.reverse().join('<p>'))
</script>
</body>
</html>