Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Add] 1주차 과제 제출 #2

Merged
merged 9 commits into from
Apr 8, 2022
Merged

[Add] 1주차 과제 제출 #2

merged 9 commits into from
Apr 8, 2022

Conversation

heerucan
Copy link
Member

@heerucan heerucan commented Apr 2, 2022

📌 관련 이슈

#1

📌 PR Point

  • 1주차 세미나 코드 직접 타이핑하며 익혀봤습니다~

interface.ts Outdated Show resolved Hide resolved
Comment on lines +75 to +81
// 증감 연산을 왼쪽에 붙이냐, 오른쪽에 붙이냐에 따라 값이 달라짐.
// 이 부분 모르겠으니까 집가서 다시봐라..
let a = 2;
// let b = a++; // -> 이렇게 하면 b가 2가 나옴
let b = ++a; // -> 이렇게 하면 b가 3이 나옴

console.log(b);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let b = a++; 가 2인 이유는
대입 연산을 먼저 진행한 후에 후치연산인 ++를 진행해서 그렇답니다!
그러니께 78번을 지나면 b는 2가 되고 a는 3이 되겠죠,,
반대로 79번은 대입 연산을 하기 전에 ++를 해줘서 a를 먼저 증가 시킨 후에 대입을 하는거죠,,
그니간 79번을 지나면 a와 b 모두 3이 되는거랍니다!! ㅋㅋ
ㅋㅋㅋㅋ

Comment on lines +22 to +51
// 여기서부터는 scope 연습

// if (true) {
// var x = 'var variable';

// }

// console.log(x);

// if (true) {
// const y = 'const variable';
// }

// console.log(y); // 여기서 에러가 난다. 이유는 const는 블록 스코프니까.


// var 변수는 function 스코프인데 가능할까?


function foo() {
if (true) {
var name = '채정아';
console.log('if-block', name);
}
console.log('function-block-', name); // 여기서 var이 호출된 거는 상관없음
}

console.log('global-', name); // 여기서 에러가 남 -> 함수 내부에서 선언이 되어 있기 때문에


Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

스코프가 헷갈리신다면,,,,,,
제가 자료를 보내드리죠...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

진짜 스승님이신가요?

console.log(sopt.group);
sopt.introduce();
console.log(sopt.season);

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

왜 빈줄이 두개죠?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

제성합니당..^^

object.js Outdated
return `오늘 메뉴는 ${dinner}입니다.`;
}

const string2 = menu2('곱창');
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

곱창은 좀.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

반영하겠습니다^^

// console.log(name3) // 임원진안짱 출력

// const name4 = "김루희짱";
// name4 = "김혜수";
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

하잉 ㅋㅋ

var name = '채정아';
console.log('if-block', name);
}
console.log('function-block-', name); // 여기서 var이 호출된 거는 상관없음
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

print("function-block-\(name)")

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hyesuuou 굉장히 킹받지만, 역시 간결해서 좋은 것 같습니다. ^^

@heerucan heerucan requested review from junjuning and orijoon98 April 3, 2022 06:41
Copy link
Member

@orijoon98 orijoon98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨습니다~!

// 1. as : 짱정아가 사용하는 방법! 나도 이거 써야징

let yourName: any = '채리지아';
let yourNameLength: number = (yourName as string).length; // 스위프트의 타입캐스팅임
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

저도 짱정아님 방식 채택~!

return `오늘 메뉴는 ${dinner}입니다.`;
}

const string2 = menu2('혜수가 싫어하는 곱창');
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hyesuuou 쨔잔~

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

저도 싫어해여

Comment on lines +30 to +35
{
name: '조우찬',
age: 3650,
group: 'ob',
mbti: ['istp', 'iOS 최고지']
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@oownahcohc 마음에 드시나요?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

age가 좀 있는 편이네요??

@heerucan heerucan changed the title [Merge] 1주차 레벨1 실천과제 제출 [Add] 1주차 레벨1 실천과제 제출 Apr 4, 2022
@heerucan heerucan changed the title [Add] 1주차 레벨1 실천과제 제출 [ADD] 1주차 레벨1 실천과제 제출 Apr 4, 2022
Copy link
Member

@junjuning junjuning left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

세미나 열심히들으셨군요'^'

간간이 있는 주석 혼잣말이 넘나 킹받아요ㅋㅋ

Copy link

@pcsoyeon pcsoyeon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧑🏻‍🎤 LGTM

Comment on lines +94 to +101
// 비교연산자
if (A === x) {
console.log('A===5, 값과 타입도 같음');
}

if (A === y) {
console.log('A===문자열5, 값과 타입도 같음');
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

=== 은 swift에는 없나요?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

넵 있습니다! 그런데 소연님 왜 물어보시져? 아시잖아여.

@heerucan heerucan changed the title [ADD] 1주차 레벨1 실천과제 제출 [Add] 1주차 과제 제출 Apr 8, 2022
random.ts Outdated
Comment on lines 5 to 15
interface Members {
name: String;
group: String;
}

// 기억하기! : interface에는 함수가 들어갈 수 있음
interface Dinner {
member: Members[];
shuffle(member: Members[]): Members[];
organize(member: Members[]): void;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

인터페이스 모듈화 부탁드려요 불 - 편 합니다 ㅋㅋㅋㅋㅋ

random.ts Outdated
Comment on lines 47 to 50
const ob = array.filter((array) => array.group === "ob");
const yb = array.filter((array) => array.group === "yb");

let dinnerMember: String[] = [ob[0].name, yb[0].name];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

filter를 사용하셔서 인덱스로 접근을 해야 하는게 살짝 아쉽네요.
find에 대해서 알아보시는 건 어떨까요? ㅎㅎㅎㅎ

Copy link
Member

@junjuning junjuning left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

리팩토링 수고요

random.ts Outdated
Comment on lines 5 to 15
interface Members {
name: String;
group: String;
}

// 기억하기! : interface에는 함수가 들어갈 수 있음
interface Dinner {
member: Members[];
shuffle(member: Members[]): Members[];
organize(member: Members[]): void;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

인터페이스 모듈화 ㅋㅋ갈겨

random.ts Outdated
Comment on lines 47 to 48
const ob = array.filter((array) => array.group === "ob");
const yb = array.filter((array) => array.group === "yb");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

find도 써보셈ㅋㅋ

Comment on lines +23 to +26
{
name: "남준표",
group: "ob",
},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

나자나~?

Copy link
Member

@junjuning junjuning left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

한번더~!

random.ts Outdated
const ob = array.find((array) => array.group === "ob") as Members;
const yb = array.find((array) => array.group === "yb") as Members;

let dinnerMember: String[] = [ob.name as String, yb.name];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ob는 타입단언 해줬는데 왜 yb는 안해줬죠? 와이비 차별하시나요?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

사실 안하는게 맞을걸??

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ㅋㅋㅋㅋㅋㅋㅋ아 제발ㅋ 지웟어 어서 approved 눌러종

random.ts Outdated

let dinnerMember: String[] = [ob[0].name, yb[0].name];
let dinnerMember: String[] = [ob.name as String, yb.name];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yb 는 왜 안해줘요??? 다시~~~!!!!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

진짜 개킹받네여;;ㅋ ㅈㅅㅈㅅ

Copy link
Member

@junjuning junjuning left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

하세요 머지~

Copy link
Member

@orijoon98 orijoon98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

참 잘했어요 도장 쾅!

@heerucan heerucan merged commit 152af46 into main Apr 8, 2022
@heerucan heerucan deleted the seminar/1 branch April 8, 2022 14:00
name: '김후릐',
age: 98,
group: 'yb',
mbti: ['ISFP', 'iOS']

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mbti가 iOS이세여?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CatchMe 라고 바꿀래영...

return `오늘 메뉴는 ${dinner}입니다.`;
}

const string2 = menu2('혜수가 싫어하는 곱창');

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

저도 싫어해여

heerucan added a commit that referenced this pull request Apr 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants