Skip to content

Instantly share code, notes, and snippets.

View Violet-Bora-Lee's full-sized avatar
๐Ÿ’œ
I code, build and act.

Bora Lee Violet-Bora-Lee

๐Ÿ’œ
I code, build and act.
View GitHub Profile
@Violet-Bora-Lee
Violet-Bora-Lee / lw3_sophomore_solidity.sol
Last active September 26, 2024 09:57
Pocket Solidity by Bora Lee ์†”๋ฆฌ๋””ํ‹ฐ ๋ฌธ๋ฒ• ์ •๋ฆฌ, ์ด๋ณด๋ผ์˜ ํฌ์ผ“ ์†”๋ฆฌ๋””ํ‹ฐ
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.10;
// ๋งคํ•‘(Mapping)์€ ํ•ด์‹œ๋งต, ๊ฐ์ฑ„, ๋”•์…”๋„ˆ๋ฆฌ์ฒ˜๋Ÿผ ํ‚ค-๊ฐ’ ์Œ์ด ์žˆ๋Š” ๋ฐ์ดํ„ฐ๋ฅผ ์ €์žฅํ•  ๋•Œ ์‚ฌ์šฉํ•œ๋‹ค.
contract Mapping {
// ์ฃผ์†Œ(ํ‚ค)์™€ uint(๊ฐ’)์Œ์„ ๋งคํ•‘ํ•จ
mapping(address => uint) public myMap;
function get(address _addr) public view returns (uint) {
// ๋งคํ•‘์€ ํ•ญ์ƒ ๊ฐ’์„ ๋ฐ˜ํ™˜ํ•˜๋Š”๋ฐ,
@gaearon
gaearon / modern_js.md
Last active April 14, 2025 19:22
Modern JavaScript in React Documentation

If you havenโ€™t worked with JavaScript in the last few years, these three points should give you enough knowledge to feel comfortable reading the React documentation:

  • We define variables with let and const statements. For the purposes of the React documentation, you can consider them equivalent to var.
  • We use the class keyword to define JavaScript classes. There are two things worth remembering about them. Firstly, unlike with objects, you don't need to put commas between class method definitions. Secondly, unlike many other languages with classes, in JavaScript the value of this in a method [depends on how it is called](https://developer.mozilla.org/en-US/docs/Web/Jav