Created
March 13, 2020 16:08
-
-
Save jasonmitchell/3d1b143d66807bcf564678251566ae42 to your computer and use it in GitHub Desktop.
// source https://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"> | |
function reverse(s) { | |
for (var i = s.length - 1, o = ''; i >= 0; o += s[i--]) { } | |
return o; | |
} | |
console.log(reverse('hello world')); | |
</script> | |
<script id="jsbin-source-javascript" type="text/javascript">function reverse(s) { | |
for (var i = s.length - 1, o = ''; i >= 0; o += s[i--]) { } | |
return o; | |
} | |
console.log(reverse('hello world'));</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 reverse(s) { | |
for (var i = s.length - 1, o = ''; i >= 0; o += s[i--]) { } | |
return o; | |
} | |
console.log(reverse('hello world')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment