<h2>Sorting of 2,8,6,3,9,1,5</h2><br><br>
<script>
function sort(){
const number = ["2","8","6","3","9","1","5"];
document.getElementById("result").innerHTML=number.sort(); // for Increasing Order
// for Decreasing Order
number.sort();
number.reverse();
document.getElementById("result_2").innerHTML=number;
}
</script>
<div id="result"></div><br><br>
<div id="result_2"></div><br><br>
<input type="button" onclick="sort()" value="Click to sort">
Choose the right course and start building your future with practical skills.
Learn HTML, CSS, JavaScript, and PHP to build modern, responsive websites and real-world projects.
Enroll Now See Full Details
Understand electronics basics with hands-on breadboard projects and circuit building techniques.
Enroll Now See Full Details
Step into AI with real-world applications, automation tools, and smart development techniques.
Enroll Now See Full Details