Created
June 19, 2017 14:55
-
-
Save Clickys/71ecbeee81c927f0a2fe2bbb58c6d76b to your computer and use it in GitHub Desktop.
JS Bin // source https://jsbin.com/xipokef
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 str( strName ) { | |
var arr; | |
var code; | |
var strCode = ""; | |
for ( var i = 0; i < strName.length; i++ ) { | |
code = strName.charCodeAt(i); | |
if ( strName.charCodeAt(i) === 'a'|| strName.charCodeAt(i) === 'e' || strName.charCodeAt(i) === 'o' || strName.charCodeAt(i) === 'i' || strName.charCodeAt(i) === 'u' ) { | |
strName.charCodeAt(i).toUpperCase(); | |
code = strName.charCodeAt(i); | |
} else { | |
code = strName.charCodeAt(i); | |
} | |
if ( code === 32 ) { | |
strCode += String.fromCharCode( code ); | |
} else { | |
strCode += String.fromCharCode( code + 1 ); | |
if ( strCode.charAt(i) === 'a' || strCode.charAt(i) === 'e' || strCode.charAt(i) === 'o' || strCode.charAt(i) === 'i' || strCode.charAt(i) === 'u' ) { | |
} | |
} | |
console.log(strCode); | |
} | |
} | |
str('adl ael'); | |
</script> | |
<script id="jsbin-source-javascript" type="text/javascript"> | |
function str( strName ) { | |
var arr; | |
var code; | |
var strCode = ""; | |
for ( var i = 0; i < strName.length; i++ ) { | |
code = strName.charCodeAt(i); | |
if ( strName.charCodeAt(i) === 'a'|| strName.charCodeAt(i) === 'e' || strName.charCodeAt(i) === 'o' || strName.charCodeAt(i) === 'i' || strName.charCodeAt(i) === 'u' ) { | |
strName.charCodeAt(i).toUpperCase(); | |
code = strName.charCodeAt(i); | |
} else { | |
code = strName.charCodeAt(i); | |
} | |
if ( code === 32 ) { | |
strCode += String.fromCharCode( code ); | |
} else { | |
strCode += String.fromCharCode( code + 1 ); | |
if ( strCode.charAt(i) === 'a' || strCode.charAt(i) === 'e' || strCode.charAt(i) === 'o' || strCode.charAt(i) === 'i' || strCode.charAt(i) === 'u' ) { | |
} | |
} | |
console.log(strCode); | |
} | |
} | |
str('adl ael');</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 str( strName ) { | |
var arr; | |
var code; | |
var strCode = ""; | |
for ( var i = 0; i < strName.length; i++ ) { | |
code = strName.charCodeAt(i); | |
if ( strName.charCodeAt(i) === 'a'|| strName.charCodeAt(i) === 'e' || strName.charCodeAt(i) === 'o' || strName.charCodeAt(i) === 'i' || strName.charCodeAt(i) === 'u' ) { | |
strName.charCodeAt(i).toUpperCase(); | |
code = strName.charCodeAt(i); | |
} else { | |
code = strName.charCodeAt(i); | |
} | |
if ( code === 32 ) { | |
strCode += String.fromCharCode( code ); | |
} else { | |
strCode += String.fromCharCode( code + 1 ); | |
if ( strCode.charAt(i) === 'a' || strCode.charAt(i) === 'e' || strCode.charAt(i) === 'o' || strCode.charAt(i) === 'i' || strCode.charAt(i) === 'u' ) { | |
} | |
} | |
console.log(strCode); | |
} | |
} | |
str('adl ael'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment