자바스크립트 질문 및 답변

1. javascript에 있는 다른 데이터 유형은 무엇입니까?
  • 문자열
  • represents textual data
  • 번호
  • an integer or a floating-point number
  • BigInt
  • an integer with arbitrary precision
  • 부울Any of two values: true or false
  • 한정되지 않은a data type whose variable is not initialized
  • 없는denotes a null value
  • 상징data type whose instances are unique and immutable
  • 객체
  • key-value pairs of collection of data`

    2. 자바스크립트에서 Hoisting에 대해 설명하시오.
    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.

    3. "=="와 "==="연산자의 차이점.
    = = in JavaScript is used for comparing two variables, but it ignores the datatype of variable.= = = is used for comparing two variables, but this operator also checks datatype and compares two values.Checks the equality of two operands without considering their type.
    4. javascript에서 Implicit Type Coercion에 대해 설명하시오.
    Implicit coercion happens when JavaScript coerces the value type to the expected type under the hood.
    5. javascript는 정적으로 입력되는 언어입니까 아니면 동적으로 입력되는 언어입니까?
    JavaScript is called a dynamic language because it doesn't just have a few dynamic aspects, pretty much everything is dynamic. All variables are dynamic (both in type and existance), and even the code is dynamic.
    6. JavaScript에서 NaN 속성은 무엇입니까?
    In JavaScript, NaN stands for Not a Number. It represents a value which is not a valid number.
    7. 값에 의한 전달과 참조에 의한 전달에 대해 설명하십시오.
    you can pass by value and by reference. The main difference between the two is that passing by value happens when assigning primitives while passing by reference when assigning objects.
    8. javascript에서 즉시 호출되는 함수는 무엇입니까?
    An immediately invoked function expression is a programming language idiom which produces a lexical scope using function scoping.
    9. javascript에서 고차 함수를 설명하십시오.

    `A “higher-order function” is a function that accepts functions as parameters and/or returns a function.`
    

    10. "이"키워드를 설명하십시오.
    “This” keyword refers to an object that is executing the current piece of code.
    11. call(), apply() 및 bind() 메서드 설명
    - call()
    It can be used to invoke (call) a method with an owner object as an argument (parameter).
    - Apply()
    you can write a method once, and then inherit it in another object, without having to rewrite the method for the new object
    - bind()
    The bind() method creates a new function, when invoked, has the this sets to a provided value.

    12. 자바스크립트에서 커링이란?
    Currying is a process in functional programming in which we can transform a function with multiple arguments into a sequence of nesting functions. It returns a new function that expects the next argument inline.
    13. javascript에서 Scope와 Scope Chain에 대해 설명하시오.
    - Each
    function creates a new scope. Variables defined inside a function are not accessible (visible) from outside the function
    - while
    scope chain is used to resolve the value of variable names in javascript.

    14. JavaScript의 클로저 설명
    A closure is the combination of a function bundled together (enclosed) with references to its surrounding state (the lexical environment)
    15. 객체 프로토타입이란 무엇입니까?
    Prototypes are the mechanism by which JavaScript objects inherit features from one another.
    16. 콜백이란 무엇입니까?
    A callback is a function passed as an argument to another function
    17. 메모이제이션이란?“Memoization is an optimization technique where expensive function calls are cached such that the result can be immediately returned the next time the function is called with the same arguments”
    18. 프로그래밍 언어에서 재귀란 무엇입니까?
    recursion is a programming technique using function or algorithm that calls itself one or more times until a specified condition is met at which time the rest of each repetition is processed from the last one called to the first.
    19. javascript에서 생성자 함수의 용도는 무엇입니까?
    The Function constructor creates a new Function object. Calling the constructor directly can create functions dynamically, but suffers from security and similar (but far less significant) performance issues to Global_Objects/eval
    20. DOM이란 무엇입니까?
    DOM stands for Document Object Model. It is a programming interface that allows us to create, change, or remove elements from the document. We can also add events to these elements to make our page more dynamic.

    좋은 웹페이지 즐겨찾기