Created
August 2, 2018 08:58
-
-
Save robgmerrill/68898456ff26ac52be49fe56e535c52e to your computer and use it in GitHub Desktop.
// source http://jsbin.com
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 charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> | |
// Reverse a String | |
// 'car' -> 'rac' | |
// 'bar' -> 'rab' | |
function revString(str) { | |
return str.split('').reverse().join(''); | |
} | |
console.log(typeof(revString('car'))); | |
console.log(revString('bar')); | |
</script> | |
<script id="jsbin-source-javascript" type="text/javascript">// Reverse a String | |
// 'car' -> 'rac' | |
// 'bar' -> 'rab' | |
function revString(str) { | |
return str.split('').reverse().join(''); | |
} | |
console.log(typeof(revString('car'))); | |
console.log(revString('bar'));</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
// Reverse a String | |
// 'car' -> 'rac' | |
// 'bar' -> 'rab' | |
function revString(str) { | |
return str.split('').reverse().join(''); | |
} | |
console.log(typeof(revString('car'))); | |
console.log(revString('bar')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment