Giter Site home page Giter Site logo

javascript-practice's Introduction

JavaScript 연습

1. this

  • this는 함수가 어떻게 호출되는지에 따라 동적으로 결정
  • this의 주요 목적은 작성된 코드를 여러 목적으로 재사용하기 위해 존재하지만 호출되는 방식에 따라 동적으로 결정되어 잘못된 코드를 작성할 수 있음
  • 전역에서 사용할 수도 있고 함수 안에서 사용할 수 있지만 함수는 객체 안에 메소드로 정의될 수 있고, 생성자 함수로 사용될 수 있고, 특정 로직을 계산하여 값을 반환하는 목적으로도 사용
  • 힘수가 다양하게 사용되기 대문에 this도 각 함수별로 다르게 해석. 화삺 함수에서으 this도 다르게 해석되고 class 안에서 사용되는 this는 생성자 함수와 동일

javascript-practice's People

Contributors

rose-rosie-rose avatar

Watchers

 avatar

javascript-practice's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.