Skip to content

Instantly share code, notes, and snippets.

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