Skip to content

Commit 8bf126d

Browse files
committed
string litearal fixed
1 parent 6183816 commit 8bf126d

1 file changed

Lines changed: 43 additions & 8 deletions

File tree

data/kotlin.json

Lines changed: 43 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,7 @@
5656
},
5757
{
5858
"definition": "বহু লাইনের স্ট্রিং যুক্তকরন",
59-
"code": "val text = """
60-
|First Line
61-
|Second Line
62-
|Third Line
63-
""".trimMargin()"
59+
"code": "val text = \"\"\"\n|First Line\n|Second Line\n|Third Line \"\"\".trimMargin()"
6460
},
6561
{
6662
"definition": "সাব স্ট্রিং করুন",
@@ -73,10 +69,17 @@
7369
},
7470
{
7571
"title": "কন্ট্রোল ফ্লো",
76-
"items": [{
72+
"items": [
73+
{
7774
"definition": "সাধারন if-else",
7875
"code": "if(condition) { ... } else { ... }"
7976
},
77+
78+
{
79+
"definition": "মাল্টিপল কন্ডিশন ",
80+
"code": "if (score in 0..1000) { }"
81+
},
82+
8083
{
8184
"definition": "when যেটি গতানুগতিক switch এর বিকল্প হিসেবে ব্যাবহার করা হয়",
8285
"code": "when (x) {\n 1 -> print(\"x == 1\")\n 2 -> print(\"x == 2\")\n else -> {\n print(\"x is neither 1 nor 2\")\n }\n}"
@@ -115,7 +118,7 @@
115118
"title": "টারনারি অপারেশনস",
116119
"items": [ {
117120
"definition": "টারনারি অপারেশন ",
118-
"code": "val text = if (x > 5) x > 5 else x <= 5"
121+
"code": "val numOfTypes = if (x > 5) x > 5 else x <= 5"
119122
}]
120123
},
121124
{
@@ -144,8 +147,40 @@
144147
{
145148
"definition": "আনসাইনড রাইট শিফট ",
146149
"code": "a ushr 2"
147-
},
150+
}
148151

152+
]
153+
},
154+
{
155+
"title": "টাইপ চেক এবং কাস্টিং",
156+
"items": [
157+
{
158+
"definition": "টাইপ চেক ",
159+
"code": "var age = object as? AgeData // var age = object as AgeData?"
160+
},
161+
{
162+
"definition": "টাইপ চেক ( implicit ) ",
163+
"code": "if ( object is age ) { var age = object } // smart casting"
164+
}
165+
166+
]
167+
},
168+
{
169+
"title": "আর্গুমেন্ট পাস ও মেথড ডাটা রিটার্ন ",
170+
"items": [
171+
{
172+
"definition": "ভ্যারয়েবল নাম্বার অফ আর্গুমেন্টস ",
173+
"code": "fun doSomething(vararg numbers: Int) { }"
174+
},
175+
{
176+
"definition": "সিঙ্গেল এক্সপ্রেশন ফাংশন ",
177+
"code": "fun getAge(): Int = age "
178+
},
179+
{
180+
"definition": "সিঙ্গেল এক্সপ্রেশন ফাংশন আরো সিম্পলভাবে",
181+
"code": "fun getAge() = age // return-type is Int "
182+
}
183+
149184
]
150185
}
151186

0 commit comments

Comments
 (0)