Your SlideShare is downloading. ×
  • Like
Coffeescript - Getting Started
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Coffeescript - Getting Started

  • 2,655 views
Published

FRENS의 JavaScript Application Framework 스터디에서 한 발표 자료

FRENS의 JavaScript Application Framework 스터디에서 한 발표 자료

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
2,655
On SlideShare
0
From Embeds
0
Number of Embeds
2

Actions

Shares
Downloads
15
Comments
0
Likes
1

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. CoffeeSc"pt gettingstarted 2011.08.08 Outsider
  • 2. Howtorun
  • 3. inWebBrowser<scripttype=”coffee-script.js”><scripttype=”text/coffeescript”>//coffeescriptcode</script>
  • 4. inOSXorLinux -installnode.js -installnpm$npminstall-gcoffee-script$coffee
  • 5. inWindows useCoffeeScriptCompiler ForWindows https://github.com/alisey/CoffeeScript-Compiler-for-Windows
  • 6. Function
  • 7. 함수를정의한다 ->
  • 8. 생략 괄호:() 중괄호:{} 세미콜론:;
  • 9. ->‘HelloWorld’do->‘HelloWorld’(->‘HelloWorld’)()
  • 10. 함수의마지막표현식이 자동으로리턴된다(return문을사용할수도있다)
  • 11. 이름있는함수는변수에할당 greeting=->‘HelloWorld’
  • 12. 파라미터 print=(msg)->msg
  • 13. Interpolation:“#{}” p=(msg)->“hello#{msg}” p=(msg)->‘hello‘+msg
  • 14. +오퍼레이터는공백에따라다르다 ‘frends’+5//frends5 ‘frends’+5//TypeError
  • 15. Operator is//=== isnt//!== not//! and//&& or//|| true,yes,on//true false,no,off//false
  • 16. Contidional iftruethen1 1iftrue iftruethen1else2 1unlesstrue
  • 17. 존재여부확인 값이있거나 undefined나null이아니면 trueunlessa? a?b a?=b
  • 18. Scope
  • 19. 변수의범위 모든함수는범위를만든다 변수가할당된최상위범위에서존재 범위밖에서는접근할수없다
  • 20. Context
  • 21. this @
  • 22. 현재컨택스트로this고정 => not->
  • 23. 프로퍼티setName=(name)->@name=name setName=(@name)->
  • 24. 기본값func=(a=true)->...
  • 25. Splats:... func=(a,b...)-> func=(a,b...,c)-> func-(a...,b)->
  • 26. Splats:... user=[1,2,3,4,5] [a...,b]=user