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
| function isPrime(x) { | |
| for (let i = 2; i < x; i = i+1) { | |
| if (x % i === 0) { | |
| return false; | |
| } | |
| } | |
| return true; | |
| } | |
| function findNthPrime(x) { |
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
| function getMuhammetKacPorsiyonYer(porsiyonFiyati) { | |
| //in TL | |
| var muhammetSabiti = 20; | |
| var porsiyon = muhammetSabiti / porsiyonFiyati; | |
| if(porsiyon < 1) { | |
| throw new Error('Cok pahali'); | |
| } else if(porsiyon >= 1 && porsiyon < 1.5) { | |
| return 1; | |
| } else if(porsiyon >= 1.5 && porsiyon < 2) { |
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
| function getYukselsResponse(statics, bulusmaAyarlayan, bulusmaYeri, event, cokIsrar) { | |
| return isBulusmayiAyarlayanYuksel(statics, bulusmayiAyarlayan) || | |
| isBulusmaYeriYukseleUyuyor(statics, bulusmaYeri) || | |
| isEventYukseleUyuyor(statics, event) || | |
| cokIsrar; | |
| } | |
| function isBulusmayiAyarlayanYuksel(statics, bulusmayiAyarlayan) { | |
| return bulusmayiAyarlayan === statics.people.YUKSEL; |