Created
May 25, 2017 13:22
-
-
Save gustavom/538584cf1df54f8ad5ec52100adbee38 to your computer and use it in GitHub Desktop.
JS Bin // source http://jsbin.com/mopewawofo
This file contains hidden or 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"> | |
const word = 'Palavra' | |
function removeLastChar (word) { | |
console.log(word) | |
if (word.length === 0) { | |
return | |
} | |
setTimeout(() => { | |
removeLastChar(word.replace(/\w$/, '')) | |
}, 1000) | |
} | |
removeLastChar(word) | |
</script> | |
<script id="jsbin-source-javascript" type="text/javascript">const word = 'Palavra' | |
function removeLastChar (word) { | |
console.log(word) | |
if (word.length === 0) { | |
return | |
} | |
setTimeout(() => { | |
removeLastChar(word.replace(/\w$/, '')) | |
}, 1000) | |
} | |
removeLastChar(word)</script></body> | |
</html> |
This file contains hidden or 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
const word = 'Palavra' | |
function removeLastChar (word) { | |
console.log(word) | |
if (word.length === 0) { | |
return | |
} | |
setTimeout(() => { | |
removeLastChar(word.replace(/\w$/, '')) | |
}, 1000) | |
} | |
removeLastChar(word) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment