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
.swal-modal { | |
.swal-icon--info { | |
&::before, | |
&::after { | |
background-color: #a5dc86; | |
} | |
color: rgba(57, 57, 64, 0.95); | |
border: 4px solid #a5dc86; | |
} | |
.swal-title, |
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
// ************************************************************************************ | |
// https://www.codewars.com/kata/the-hashtag-generator | |
// The marketing team is spending way too much time typing in hashtags. | |
// Let's help them with our own Hashtag Generator! | |
// Here's the deal: | |
// It must start with a hashtag (#). | |
// All words must have their first letter capitalized. |
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.capitalize = function() { | |
return `${this[0].toUpperCase()}${this.slice(1)}` | |
} | |
console.log('ini teks'.capitalize()) // => 'Ini teks' |
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
extension Sorting on List<int> { | |
List<int> sortAsc() { | |
List<int> list = this; // Selection sort algorithm | |
int length = this.length; | |
for (int i = 0; i < length - 1; i++) { | |
int min = i; | |
for (int j = i + 1; j < length; j++) { | |
if (list[j] < list[min]) { | |
min = j; |
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
for(let i = 1; i <= 100; i++) { | |
const str = (i % 3 ? '' : 'Fizz') + (i % 5 ? '' : 'Buzz'); | |
console.log(str || i); | |
} |