Created
April 10, 2019 22:19
-
-
Save GarrettS/5d72c5f1e61b1584c884fddd08da98b3 to your computer and use it in GitHub Desktop.
Welcome to Walmart Walmart Interview Question // source https://jsbin.com/jajazed
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
<!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 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