Hi
I am currently learning javascript and I came across this exercise question:
Code
<html>
<head>
</head>
<body>
<script language="javascript">
var numbers = [-19, -7, -55, 78, 54, 60, -53, 35, 56, 42, 20, 77, 93, -41, -24, -60, 7, 86, 14, -99];
alert (secondLargest(numbers));
alert (reverse("CSY2028""";
}
</script>
</body>
</html>
Copyright GeekInterview.com
The scenario is that I have to
Define a function secondLargest() that takes an array and returned the 2nd largest number.
AND
Define a function reverse() that computes the reversal of a string. For example, reverse("Hello world") should return the string "I love Javascript".
I have had done many attempts to solve the task but I run into problems.
Any help? it would be appreciated
JAVASCRIPT difficulty
Hi
I am currently learning javascript and I came across this exercise question:
The scenario is that I have to
Define a function secondLargest() that takes an array and returned the 2nd largest number.
AND
Define a function reverse() that computes the reversal of a string. For example, reverse("Hello world") should return the string "I love Javascript".
I have had done many attempts to solve the task but I run into problems.
Any help? it would be appreciated
Profile Answers by GlennYemoh Questions by GlennYemoh
Questions by GlennYemoh
Related Answered Questions
Related Open Questions