-
Notifications
You must be signed in to change notification settings - Fork 0
/
snippets.json
49 lines (49 loc) · 1.43 KB
/
snippets.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
{
"Function": {
"prefix": "function",
"body": [
"fn ${1:name} {",
" return $2;",
"}"
],
"description": "Carbon Function: A function is a block of code that can be called from other code. Functions can be used to create custom logic, to handle events, or to create reusable components."
},
"Class": {
"prefix": "class",
"body": [
"class ${1:name} {",
" var $2;",
"};"
],
"description": "Carbon Class: A class is a block of code that can be used to create objects. Classes can be used to create reusable components or to serve as a prototype for other objects."
},
"If": {
"prefix": "if",
"body": [
"if (${1:condition}) {",
" ${2:code}",
"}"
],
"description": "Carbon If: An if statement is a block of code that is executed if a condition is true."
},
"Else": {
"prefix": "else",
"body": [
"else {",
" ${1:code}",
"}"
],
"description": "Carbon Else: An else statement is a block of code that is executed if a condition is false."
},
"IfElse": {
"prefix": "ifelse",
"body": [
"if (${1:condition}) {",
" ${2:code}",
"} else {",
" ${3:code}",
"}"
],
"description": "Carbon If Else Statement"
}
}