Created
April 21, 2020 12:40
-
-
Save essamamdani/1ec1ed9013ca8098528009d6b9fbc8f5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
//declaring a function to sort numbers | |
function sortNumbers(){ | |
//declare and initialize array of numbers | |
const nums = [3,14,45,12]; | |
//sort the array and display the result | |
document.write(nums.sort()); | |
} | |
sortNumbers(); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment