-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
62 changed files
with
100 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# Data Type | ||
## Array | ||
|
||
```javascript | ||
const daysOfWeek = ['mon','tue','wed','thu','fri','sat']; | ||
|
||
// Get Item from Array | ||
console.log(daysOfWeek[4]); | ||
|
||
// Add one more day to the array | ||
daysOfWeek.push('sun'); | ||
|
||
console.log(daysOfWeek); | ||
``` | ||
|
||
 | ||
|
||
## Object | ||
|
||
```javascript | ||
const player = { | ||
name: "LiJell", | ||
points: 10, | ||
fat: true, | ||
}; | ||
|
||
console.log(player); | ||
console.log(player.name); | ||
console.log(player["points"]); | ||
``` | ||
|
||
 | ||
|
||
```javascript | ||
const player = { | ||
name: "LiJell", | ||
points: 10, | ||
fat: true, | ||
}; | ||
|
||
console.log(player); | ||
console.log(player.name); | ||
console.log(player["points"]); | ||
|
||
|
||
player.fat = false; | ||
console.log(player); | ||
``` | ||
|
||
 | ||
|
||
- const를 바꿀 수 없지만, const 안의 Object를 변경하는 것이기 때문에 부분 수정이 가능하다 | ||
|
||
- 하지만, const 전체를 바꾸려하면 에러가 생김 | ||
- Object 추가도 가능 | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Function | ||
|
||
```javascript | ||
function sayHello(nameOfPerson, age) { | ||
console.log("Hello my name is " + nameOfPerson + " and I am " + age) | ||
} | ||
|
||
sayHello("LiJell", 10); | ||
sayHello("Hanju", 18); | ||
sayHello("Toonsquare", 99); | ||
``` | ||
|
||
 | ||
|
||
```javascript | ||
function plus(a, b) { | ||
console.log(a + b); | ||
} | ||
|
||
function divide(a,b) { | ||
console.log(a / b); | ||
} | ||
plus(1, 3); | ||
divide(20, 5); | ||
``` | ||
|
||
 | ||
|
||
```javascript | ||
const player = { | ||
name: "LiJell", | ||
sayHello: function (otherPersonsName) { | ||
console.log("Hello! " + otherPersonsName + " nice to meet you!"); | ||
}, | ||
}; | ||
|
||
|
||
console.log(player.name); | ||
player.sayHello("Hanju"); | ||
|
||
``` | ||
|
||
 |
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
File renamed without changes
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.