Created
August 18, 2022 00:15
-
-
Save loschtreality/4ca67e7fda9db812db8317ba97a187f1 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// Write a function which takes in an array of elements and prints the elements in reverse to the console | |
function printBackwards(inputArray) { | |
// write your code here | |
} | |
// A few tests | |
console.log(printBackwards([1, 2, 3, 4, 5])) // prints "5 4 3 2 1" | |
console.log(printBackwards(["o", "l", "l", "e", "h"]) // prints "h e l l o" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment