-
항해 99 5기 TIL_3항해 99 2022. 1. 13. 03:11
▶ Today I Learned
너무나 많은 걸 배웠다..
프로젝트 페이지의 기능과 뼈대를 실현하느라 수 많은 함수와 블로그, 공식문서들을 찾아보아서
잘 기억도 나지 않는다.
아.. 전날 고민해가며 해결하지 못했던 문제를 해결했다.
분명 맞게 썼다고 생각했는데
나는 순간 초반에
let title = postings['title']
alert('title')
을 하려고 했던 것이다.. console이나 alert에는 계속해서 undefined라는 문구만 떴다.
생각해보니 많은 값으로 이루어져 있고 데이터는 리스트 형태로 저장되어 있기에 배열의 특정한 값 만을 지정하지 않고 모두 불러오는 게 불가능했던 것이다..! => (2022.1.16 생각: 이것을 좀 더 명쾌히 설명하자면
postings가 배열 형태로 된 데이터를 담고 있고 ['title']은 1차원 배열의 데이터다. 즉, 배열 안에 담긴 값이라는 말.
하지만 변수로 지정했던 title은 1차원 배열 안이 아닌 그저 변수였기에 데이터를 담는 차원이 달랐던 것
그러니 데이터를 정상적으로 불러와도 담을 공간의 차원이 맞지 않아 데이터가 undefined로만 떴던 것 같다.)
다음과 같이 바꾸니 콘솔에도 정상적으로 입력되었다.
let title = postings['title'] - > let title = postings
console.log(postings)
....혼자서 고민하고 찾아보고 여러 요소들을 바꾸어보고 시도해보았지만 도저히 몰랐다.. 그래서 팀원들에게 자문을 구했고
2초만에 알게 되었다... 정말 어이가 없었다..
▶ 느낀 점
1. 굉장히 어렵다고 느꼈던 문제가 사실은 매우 단순한 문제일 수 있다. 문제를 너무 어렵게 접근하지 말자.
2. 혼자서 하는 것 보다 의견을 나누는 것이 도움이 된다. 타인의 시선으로 바라보면 늘 새로운 관점을 얻을 수 있다. 실제로 팀원들과 상의한 덕분에 알게된 것들이 많다! 아직 도움을 별로 주지 못한 것 같아미안한 마음이 크다. 더 열심히 해서 더 많은 도움을 줄 수 있는 개발자가 되고 싶다.
3. 삽질은 분명 도움이 된다. 단순한 문제이든 아니든 관련된 정보를 끊임없이 파보고 집요하게 물고 늘어지는 경험이 지금은 많은 시간을 잡아먹는다.. 그래도 이렇게 고민하고 삽질하는 과정이 쌓여 내실이 튼튼한 개발자가 될 수 있겠다는 생각이 오늘도 들었다. 열심히 삽질하자.
4. CSS는 생각보다 어렵다. 눈에 보이는 것이 알게 모르게 쉽다고 느껴졌는데 큰 착각이었다. 단순해보여도 작성할 코드는 수없이 많았다. css 대단해..
5. 팀원의 의견을 귀담아 듣고 상기하자. 분명 의논하여 결정한 일인데도 나도 모르게 내가 판단한 우선순위를 먼저하고 있었다.. 의사소통은 중요하니 신경쓰도록 하자.
6. 무언가를 할 때는 집중하도록 하자. 한 가지 업무를 하다가도 다른 업무로 새곤 했던 것 같다. 우선순위를 잘 따져보고 순서대로 한가지씩 처리해나가자.
그래도 오늘 하루도 고생많았다..! 하루 3/2를 공부에 쏟아부은 자신이 대견하다 :)
▶ 공부 시 참고 링크들
너무나 많은 사이트를 봤고 그 중 일부만을 첨부한다.
https://hailey0.tistory.com/38
https://trustyou.tistory.com/99
https://jihyehwang09.github.io/2019/03/12/js-return-and-break/
https://studiomeal.com/archives/533
'항해 99' 카테고리의 다른 글
항해 99 5기 TIL_5 (0) 2022.01.14 항해 99 5기 TIL_4 (0) 2022.01.14 항해 99 5기 TIL_2 (0) 2022.01.12 항해 99 5기 TIL_1 (0) 2022.01.11 항해 99 - 웹개발 종합반 - WIL - 5 (0) 2022.01.05