1
0
mirror of https://github.com/adambard/learnxinyminutes-docs.git synced 2025-08-05 22:37:42 +02:00
This commit is contained in:
wikibook
2013-08-14 17:35:55 +09:00
2 changed files with 5 additions and 5 deletions

View File

@@ -268,7 +268,7 @@ function sayHelloInFiveSeconds(name){
// 기다리지 않고 실행을 마칩니다. 하지만 5초가 지나면 inner에서도
// prompt의 값에 접근할 수 있습니다.
}
sayHelloInFiveSeconds("Adam") // will open a popup with "Hello, Adam!" in 5s
sayHelloInFiveSeconds("Adam") // 5초 내로 "Hello, Adam!"이라고 적힌 팝업이 표시됨
///////////////////////////////////
// 5. 객체 심화; 생성자와 프로토타입
@@ -403,7 +403,7 @@ String.prototype.firstCharacter = function(){
// 예를 들어, Object.create가 모든 구현체에서 사용 가능한 것은 아니라고
// 했지만 아래의 폴리필을 이용해 Object.create를 여전히 사용할 수 있습니다.
if (Object.create === undefined){ // don't overwrite it if it exists
if (Object.create === undefined){ // 이미 존재하면 덮어쓰지 않음
Object.create = function(proto){
// 올바른 프로토타입을 가지고 임시 생성자를 만듬
var Constructor = function(){}
@@ -432,4 +432,4 @@ MDN의 ['자바스크립트 재입문'](https://developer.mozilla.org/ko/docs/A_
더불어 이 글에 직접적으로 기여한 분들로, 내용 중 일부는 이 사이트에 있는
루이 딘(Louie Dihn)의 파이썬 튜토리얼과 모질라 개발자 네트워크에 있는
[자바스크립트 튜토리얼](https://developer.mozilla.org/en-US/docs/Web/JavaScript/A_re-introduction_to_JavaScript)을 참고했습니다.
[자바스크립트 튜토리얼](https://developer.mozilla.org/en-US/docs/Web/JavaScript/A_re-introduction_to_JavaScript)을 참고했습니다.

View File

@@ -327,7 +327,7 @@ seymour:makeSound() -- 'woof woof woof' -- 4.
-- 필요할 경우, 하위 클래스의 new()는 기반 클래스의 new()와 유사합니다.
function LoudDog:new()
newObj = {}
-- set up newObj
-- newObj를 구성
self.__index = self
return setmetatable(newObj, self)
end
@@ -420,4 +420,4 @@ learn.lua로 저장한 후 "lua learn.lua"를 실행해 보세요!
이 글은 tylerneylon.com에 처음으로 써본 글이며,
<a href="https://gist.github.com/tylerneylon/5853042">Github의 Gist</a>에서도 확인할 수 있습니다.
루아로 즐거운 시간을 보내세요!
루아로 즐거운 시간을 보내세요!