Created
April 10, 2019 22:19
-
-
Save GarrettS/af4f9723cc406331f6b7433e897265e7 to your computer and use it in GitHub Desktop.
Welcome to Walmart Walmart Interview Question // source https://jsbin.com/jajazed
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="description" content="Walmart Interview Question"> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>Welcome to Walmart</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> | |
function reverseStringWords(input) { | |
return input.split(" ").reverse().join(" "); | |
} | |
console.log(reverseStringWords("Welcome to Walmart")); | |
</script> | |
<script id="jsbin-source-javascript" type="text/javascript">function reverseStringWords(input) { | |
return input.split(" ").reverse().join(" "); | |
} | |
console.log(reverseStringWords("Welcome to Walmart"));</script></body> | |
</html> |
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
function reverseStringWords(input) { | |
return input.split(" ").reverse().join(" "); | |
} | |
console.log(reverseStringWords("Welcome to Walmart")); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment