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
/* | |
Presentation Parts | |
Take away: aysnc/await uses promises and promises build with callbacks. | |
ASYNC Code evolution in JS/ES => | |
Callbacks => Promise => async/await | |
SECTION 1 | |
How aysnc/await works? |
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
String.prototype.turkishToLower = function(){ | |
var string = this; | |
var letters = { "İ": "i", "I": "ı", "Ş": "ş", "Ğ": "ğ", "Ü": "ü", "Ö": "ö", "Ç": "ç" }; | |
string = string.replace(/(([İIŞĞÜÇÖ]))/g, function(letter){ return letters[letter]; }) | |
return string.toLowerCase(); | |
} | |
String.prototype.turkishToUpper = function(){ | |
var string = this; | |
var letters = { "i": "İ", "ş": "Ş", "ğ": "Ğ", "ü": "Ü", "ö": "Ö", "ç": "Ç", "ı": "I" }; |
OlderNewer