생활코딩

Coding Everybody

코스 전체목록

닫기

JavaScript - 함수의 기본 문법

수업소개

코드를 정리 정돈해서 재활용성을 높여주는 도구인 함수의 기본 문법을 알아봅니다. 

 

 

 

강의

 

 

 

소스코드

syntax/function2.js


f123();
console.log('A');
console.log('Z');
console.log('B');
f123();
console.log('F');
console.log('C');
console.log('P');
console.log('J');
f123();
console.log('U');
console.log('A');
console.log('Z');
console.log('J');
console.log('I');
f123();

function f123(){
  console.log(1);
  console.log(2);
  console.log(3);
  console.log(4);
}

 

댓글

댓글 본문
  1. 김철흥
    2024.01.11
    완료!
  2. Hoon Ko
    20231016
  3. carpediem
    23.09.03 완료!!
  4. 어흥
    230702
  5. BF_Lee
    23.06.30

    1,2,3을 출력하는데 출력문3번쓰기싫어서 for 반복문으로 줄였다
  6. Nayeong Koo
    23.03.17
  7. 감자
    22.12.02 완료
  8. 당당
    2022.10.21
  9. 키다리아저씨
    220718 완
  10. 코지마 히데오 뺨 후릴 반바지
    와안료
  11. 소설가
    2021-1-5 완료
    고맙습니다.
  12. kimkk
    JavaScript Hoisting refers to the process whereby the interpreter appears to move the declaration of functions, variables or classes to the top of their scope, prior to execution of the code.

    Hoisting allows functions to be safely used in code before they are declared.

    Variable and class declarations are also hoisted, so they too can be referenced before they are declared. Note that doing so can lead to unexpected errors, and is not generally recommended.
  13. sofom
    f123() 함수가 18번째 줄 부터 정의되는데 어떻게 첫 번째 줄 부터 f123()을 사용할 수 있는 건가요? 확실하진 않지만 예전에 파이썬 쓸 때는 저런 경우에 함수가 정의되지 않았다고 떴던 것 같아서요.
  14. 김건희
    2021.12.27

    현재까지의 소감: 아직 어렵지만 재밌다.
  15. 초딩 개발자
    2021/12/02
  16. 김관호
    21.11.23
  17. pdpd
    21.10.07
  18. 졸작완성하자
    210907 완료
  19. 승뇽뇽
    ㅇㄹ
  20. 박사장
    21 07 29 완료!
  21. Duke
    2021.07.18
  22. Jeong Il Haan
    20210419
  23. byoonn
    완료
  24. chimhyangmoo
    21.02.19
  25. jeisyoon
    2021.02.08 완료
  26. 임찬혁
    완료
  27. Noah
    2021.01.04 완료!
  28. kkn1125
    20.12.21 완료~!
  29. Yong Hyun Lee
    완료 201002
  30. CH Yim
    완료
  31. vampa
    2020.09.09
  32. 최현규
    해당 코드의 파일 이름은 function.js 입니다.다음 페이지 소스코드가 function2.js 입니다.
  33. 마준
    완료
  34. 코딩조아
    20.08.13
  35. 누누
    2020.07.31 완료
  36. 코딩하는렌즈쟁이
    2020-07-27 (월)
    완료
  37. Jenny Song
    25th.JULY.2020 완료
  38. hoya
    2020.07.11
  39. Amousk
    좋은 강의 감사합니다.
  40. 사아
    폭발적 효과와 유지보수의 편의성!!!
  41. 김재익
    함수는 대다네~ 완료
  42. 바다의왕자
    완료
  43. Eunsung Shin
    완료
  44. 준바이
    감사합니다
  45. 심여수
    감사합니다.
  46. eddylee123456
    복습
  47. 스티븐잡숴
    완료
  48. 임은정
    완료
  49. JT_brand
    완료
  50. codinginpain
    완료
버전 관리
egoing
현재 버전
선택 버전
graphittie 자세히 보기