Created with <3 with dartpad.dev.
Last active
September 12, 2023 15:57
-
-
Save hongsw/f08369e995d48284a6c5c281643f35c0 to your computer and use it in GitHub Desktop.
Dart 'PPAP' Song
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
void main() { | |
// 단계 1: 🍎 + 🖊 = 🍎🖊 | |
String pen = '🖊'; | |
print('Pen: $pen'); // 🖊 | |
String apple = '🍎'; | |
print('Apple: $apple'); // 🍎 | |
String ap = apple + pen; | |
print('AP: $ap'); // 🍎🖊 | |
// 단계 2: 🍍 + 🖊 = 🍍🖊 | |
print('Pen: $pen'); // 🖊 | |
String pineapple = '🍍'; | |
print('Pineapple: $pineapple'); // 🍍 | |
List<String> pp = [pineapple,pen]; | |
print('PP: ${pp.join()}'); // 🍍🖊 | |
// 단계 3: 🍎🖊 + 🍍🖊 = 🍎🖊🍍🖊 | |
String ppap = pp.reversed.join() + ap; | |
// Goal : Pen-Pineapple-Apple-Pen! ×2 | |
print('PPAP: ${pp.reversed.join() + ap}'); // 🖊🍍🍎🖊 | |
print('PPAP: $ppap'); // 🖊🍍🍎🖊 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment