SlideShare a Scribd company logo
Co๏ฌ€eeSc"pt
       gettingstarted

 2011.08.08
  Outsider
Howtorun
inWebBrowser

scripttype=โ€coffee-script.jsโ€

scripttype=โ€text/coffeescriptโ€
//coffeescriptcode
/script
inOSXorLinux

    -installnode.js
    -installnpm

$npminstall-gcoffee-script
$coffee
inWindows


                               use
CoffeeScriptCompiler
    ForWindows
      https://github.com/alisey/CoffeeScript-Compiler-for-Windows
Function
ํ•จ์ˆ˜๋ฅผ์ •์˜ํ•œ๋‹ค




          -
์ƒ๋žต

        ๊ด„ํ˜ธ:()
      ์ค‘๊ด„ํ˜ธ:{}
     ์„ธ๋ฏธ์ฝœ๋ก :;
-โ€˜HelloWorldโ€™
do-โ€˜HelloWorldโ€™
(-โ€˜HelloWorldโ€™)()
ํ•จ์ˆ˜์˜๋งˆ์ง€๋ง‰ํ‘œํ˜„์‹์ด
  ์ž๋™์œผ๋กœ๋ฆฌํ„ด๋œ๋‹ค

(return๋ฌธ์„์‚ฌ์šฉํ• ์ˆ˜๋„์žˆ๋‹ค)
์ด๋ฆ„์žˆ๋Š”ํ•จ์ˆ˜๋Š”๋ณ€์ˆ˜์—ํ• ๋‹น



 greeting=-โ€˜HelloWorldโ€™
ํŒŒ๋ผ๋ฏธํ„ฐ



  print=(msg)-msg
Interpolation:โ€œ#{}โ€


 p=(msg)-โ€œhello#{msg}โ€


  p=(msg)-โ€˜helloโ€˜+msg
+์˜คํผ๋ ˆ์ดํ„ฐ๋Š”๊ณต๋ฐฑ์—๋”ฐ๋ผ๋‹ค๋ฅด๋‹ค



     โ€˜frendsโ€™+5//frends5
    โ€˜frendsโ€™+5//TypeError
Operator
                   is//===
           isnt//!==
                    not//!
           and//
                     or//||
      true,yes,on//true
     false,no,off//false
Contidional

             iftruethen1
                    1iftrue
    iftruethen1else2
             1unlesstrue
์กด์žฌ์—ฌ๋ถ€ํ™•์ธ
        ๊ฐ’์ด์žˆ๊ฑฐ๋‚˜
 undefined๋‚˜null์ด์•„๋‹ˆ๋ฉด

        trueunlessa?
                 a?b
            a?=b
Scope
๋ณ€์ˆ˜์˜๋ฒ”์œ„

      ๋ชจ๋“ ํ•จ์ˆ˜๋Š”๋ฒ”์œ„๋ฅผ๋งŒ๋“ ๋‹ค
 ๋ณ€์ˆ˜๊ฐ€ํ• ๋‹น๋œ์ตœ์ƒ์œ„๋ฒ”์œ„์—์„œ์กด์žฌ
    ๋ฒ”์œ„๋ฐ–์—์„œ๋Š”์ ‘๊ทผํ• ์ˆ˜์—†๋‹ค
Context
this




       @
ํ˜„์žฌ์ปจํƒ์ŠคํŠธ๋กœthis๊ณ ์ •



              =
                 not-
ํ”„๋กœํผํ‹ฐ


setName=(name)-@name=name


      setName=(@name)-
๊ธฐ๋ณธ๊ฐ’



func=(a=true)-...
Splats:...

        func=(a,b...)-
    func=(a,b...,c)-
         func-(a...,b)-
Splats:...


   user=[1,2,3,4,5]
             [a...,b]=user

More Related Content

PDF
De 0 a 100 con Bash Shell Scripting y AWK
KEY
CoffeeScript: JavaScript, but Better!
PDF
JavaScript Hacks for Hipsters
PDF
Fizz and buzz of computer programs in python.
PDF
The most exciting features of PHP 7.1
PDF
R ใง่งฃใ FizzBuzz ๅ•้กŒ
PDF
Learning Perl 6 (NPW 2007)
PDF
Meet up symfony 16 juin 2017 - Les PSR
De 0 a 100 con Bash Shell Scripting y AWK
CoffeeScript: JavaScript, but Better!
JavaScript Hacks for Hipsters
Fizz and buzz of computer programs in python.
The most exciting features of PHP 7.1
R ใง่งฃใ FizzBuzz ๅ•้กŒ
Learning Perl 6 (NPW 2007)
Meet up symfony 16 juin 2017 - Les PSR

What's hot (20)

PDF
What's New in PHP 5.5
ODP
Nigel hamilton-megameet-2013
ย 
PDF
GHCใ‚ฝใƒผใ‚นใ‚ณใƒผใƒ‰่ชญใฟใฎใ‚นใ‚นใƒก
PDF
Learning Perl 6
PDF
Debugging in Clojure: Finding Light in the Darkness using Emacs and Cursive
KEY
An introduction to Ruby
ODP
Embedding perl
PPTX
Introduction to Perl Programming
PPTX
Introduction to Guzzle
ย 
PDF
Advanced modulinos trial
PPT
Synapseindia php development tutorial
PDF
Beware sharp tools
PPTX
Build a compiler in 2hrs - NCrafts Paris 2015
PPT
Mocking Dependencies in PHPUnit
PDF
Caligrafia para desenvolvedores
PDF
Richard practica nยบ2.php
PDF
zshใจไปฎๆƒณ็ซฏๆœซใƒžใƒใƒผใ‚ธใƒฃใงๅฟซ้ฉใ‚ฟใƒผใƒŸใƒŠใƒซ็”Ÿๆดป
ZIP
Yes, But
PDF
One page app with AngularJS
KEY
Zen: Building Maintainable Catalyst Applications
What's New in PHP 5.5
Nigel hamilton-megameet-2013
ย 
GHCใ‚ฝใƒผใ‚นใ‚ณใƒผใƒ‰่ชญใฟใฎใ‚นใ‚นใƒก
Learning Perl 6
Debugging in Clojure: Finding Light in the Darkness using Emacs and Cursive
An introduction to Ruby
Embedding perl
Introduction to Perl Programming
Introduction to Guzzle
ย 
Advanced modulinos trial
Synapseindia php development tutorial
Beware sharp tools
Build a compiler in 2hrs - NCrafts Paris 2015
Mocking Dependencies in PHPUnit
Caligrafia para desenvolvedores
Richard practica nยบ2.php
zshใจไปฎๆƒณ็ซฏๆœซใƒžใƒใƒผใ‚ธใƒฃใงๅฟซ้ฉใ‚ฟใƒผใƒŸใƒŠใƒซ็”Ÿๆดป
Yes, But
One page app with AngularJS
Zen: Building Maintainable Catalyst Applications
Ad

Viewers also liked (6)

PDF
ํ˜ผ์ž์„œ ํ”„๋กœ์ ํŠธ ์ˆ˜ํ–‰ํ•˜๊ธฐ
PDF
๋ธ”๋กœ๊ทธ ์ฃผ๋„ ๊ฐœ๋ฐœ
PDF
๋” ๋‚˜์€ ๊ฐœ๋ฐœ์ž ๋˜๊ธฐ
PDF
Front-end Development Process - ์–ด๋””๊นŒ์ง€ ๊ฐœ์„ ํ•  ์ˆ˜ ์žˆ๋‚˜
PDF
์ดˆ๊ธ‰ ๊ฐœ๋ฐœ์ž ํƒˆ์ถœ
PDF
svn ๋Šฅ๋ ฅ์ž๋ฅผ ์œ„ํ•œ git ๊ฐœ๋… ๊ฐ€์ด๋“œ
ํ˜ผ์ž์„œ ํ”„๋กœ์ ํŠธ ์ˆ˜ํ–‰ํ•˜๊ธฐ
๋ธ”๋กœ๊ทธ ์ฃผ๋„ ๊ฐœ๋ฐœ
๋” ๋‚˜์€ ๊ฐœ๋ฐœ์ž ๋˜๊ธฐ
Front-end Development Process - ์–ด๋””๊นŒ์ง€ ๊ฐœ์„ ํ•  ์ˆ˜ ์žˆ๋‚˜
์ดˆ๊ธ‰ ๊ฐœ๋ฐœ์ž ํƒˆ์ถœ
svn ๋Šฅ๋ ฅ์ž๋ฅผ ์œ„ํ•œ git ๊ฐœ๋… ๊ฐ€์ด๋“œ
Ad

Similar to Coffeescript - Getting Started (20)

PPTX
Creating "Secure" PHP Applications, Part 1, Explicit Code & QA
PDF
PHPunit and you
PDF
Damn Fine CoffeeScript
ย 
KEY
Good Evils In Perl (Yapc Asia)
PDF
CoffeeScript
PDF
Web 8 | Introduction to PHP
PPT
Unit Testing using PHPUnit
PDF
Load Testing with PHP and RedLine13
PPTX
PHP PPT FILE
PDF
EPHPC Webinar Slides: Unit Testing by Arthur Purnama
KEY
Can't Miss Features of PHP 5.3 and 5.4
PDF
Making JavaScript Libraries More Approachable
PDF
Scaling Symfony2 apps with RabbitMQ - Symfony UK Meetup
PDF
Javascript basics
PDF
Testing Code and Assuring Quality
PPTX
Functuon
PPTX
Functuon
PPTX
Php & my sql
PPT
PHP Unit Testing
PPTX
php programming.pptx
Creating "Secure" PHP Applications, Part 1, Explicit Code & QA
PHPunit and you
Damn Fine CoffeeScript
ย 
Good Evils In Perl (Yapc Asia)
CoffeeScript
Web 8 | Introduction to PHP
Unit Testing using PHPUnit
Load Testing with PHP and RedLine13
PHP PPT FILE
EPHPC Webinar Slides: Unit Testing by Arthur Purnama
Can't Miss Features of PHP 5.3 and 5.4
Making JavaScript Libraries More Approachable
Scaling Symfony2 apps with RabbitMQ - Symfony UK Meetup
Javascript basics
Testing Code and Assuring Quality
Functuon
Functuon
Php & my sql
PHP Unit Testing
php programming.pptx

More from JeongHun Byeon (20)

PDF
GitHub Actions์˜ ๋‹ค์–‘ํ•œ ๊ธฐ๋Šฅ ํ™œ์šฉํ•˜๊ธฐ - GitHub Universe '24 Recap
PDF
๋‹น๊ทผ ๊ฐœ๋ฐœ์ž ํ”Œ๋žซํผ์€ ์–ด๋–ค ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•˜๊ณ  ์žˆ๋Š”๊ฐ€?
PDF
์˜คํ”ˆ์†Œ์Šค์— ๊ธฐ์—ฌํ•  ๋•Œ ์•Œ๋ฉด ์ข‹์„ ๊ฐœ๋ฐœ ํ”„๋กœ์„ธ์Šค
PDF
DevOps๋ฅผ ๊ฐ€์†ํ™”ํ•˜๋Š” ํ”Œ๋žซํผ ์—”์ง€๋‹ˆ์–ด๋ง
PDF
ํด๋ผ์šฐ๋“œ ์‹œ๋Œ€์— ๋งž๋Š” ์‚ฌ์ดํŠธ ์‹ ๋ขฐ์„ฑ ์—”์ง€๋‹ˆ์–ด
PDF
๋””์ž์ธ์— ์ด์–ด ์ฝ”๋”ฉ๊นŒ์ง€ AI๊ฐ€ ํ”„๋กœ๊ทธ๋žจ ๊ฐœ๋ฐœ์„ ์ฒ™์ฒ™? : GitHub Copilot, ์–ด๋””๊นŒ์ง€ ์•Œ์•„๋ณด์…จ๋‚˜์š”
PDF
Citizen ๊ฐœ๋ฐœ๊ธฐ
PDF
์˜คํ”ˆ์†Œ์Šค ๋’ค์— ๋ฉ”์ธํ…Œ์ด๋„ˆ ์žˆ์–ด์š”
PDF
์˜คํ”ˆ์†Œ์Šค์— ๊ธฐ์—ฌํ•  ๋•Œ ํ•ด๋„ ๋˜๋Š” ์ผ๊ณผ ํ•˜๋ฉด ์•ˆ๋˜๋Š” ์ผ
PDF
Lessons from maintaining Mocha, an open source project
PDF
๊ฐœ๋ฐœ ๊ด€๋ จ ๊ธฐ์ˆ  ๋ธ”๋กœ๊ทธ ์šด์˜ํ•˜๊ธฐ
PDF
Terraform์„ ์ด์šฉํ•œ Infrastructure as Code ์‹ค์ „ ๊ตฌ์„ฑํ•˜๊ธฐ
PDF
์˜คํ”ˆ์†Œ์Šค ์ƒํƒœ๊ณ„ ์ผ์›์œผ๋กœ์„œ์˜ ๊ฐœ๋ฐœ์ž(์ž๋ง‰ ๋ฒ„์ „)
PDF
์˜คํ”ˆ์†Œ์Šค ์ƒํƒœ๊ณ„ ์ผ์›์œผ๋กœ์„œ์˜ ๊ฐœ๋ฐœ์ž
PDF
Node.js API ์„œ๋ฒ„ ์„ฑ๋Šฅ ๊ฐœ์„ ๊ธฐ
PDF
Node.js ํ˜„์žฌ์™€ ๋ฏธ๋ž˜
PDF
Nodejs Production ์ ์šฉ๊ธฐ
PDF
Sublime Text tips & trikcs
PDF
Popular Convention ๊ฐœ๋ฐœ๊ธฐ
PDF
Spring Scala : ์Šคํ”„๋ง์ด ์Šค์นผ๋ผ๋ฅผ ๋งŒ๋‚ฌ์„ ๋•Œ
GitHub Actions์˜ ๋‹ค์–‘ํ•œ ๊ธฐ๋Šฅ ํ™œ์šฉํ•˜๊ธฐ - GitHub Universe '24 Recap
๋‹น๊ทผ ๊ฐœ๋ฐœ์ž ํ”Œ๋žซํผ์€ ์–ด๋–ค ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•˜๊ณ  ์žˆ๋Š”๊ฐ€?
์˜คํ”ˆ์†Œ์Šค์— ๊ธฐ์—ฌํ•  ๋•Œ ์•Œ๋ฉด ์ข‹์„ ๊ฐœ๋ฐœ ํ”„๋กœ์„ธ์Šค
DevOps๋ฅผ ๊ฐ€์†ํ™”ํ•˜๋Š” ํ”Œ๋žซํผ ์—”์ง€๋‹ˆ์–ด๋ง
ํด๋ผ์šฐ๋“œ ์‹œ๋Œ€์— ๋งž๋Š” ์‚ฌ์ดํŠธ ์‹ ๋ขฐ์„ฑ ์—”์ง€๋‹ˆ์–ด
๋””์ž์ธ์— ์ด์–ด ์ฝ”๋”ฉ๊นŒ์ง€ AI๊ฐ€ ํ”„๋กœ๊ทธ๋žจ ๊ฐœ๋ฐœ์„ ์ฒ™์ฒ™? : GitHub Copilot, ์–ด๋””๊นŒ์ง€ ์•Œ์•„๋ณด์…จ๋‚˜์š”
Citizen ๊ฐœ๋ฐœ๊ธฐ
์˜คํ”ˆ์†Œ์Šค ๋’ค์— ๋ฉ”์ธํ…Œ์ด๋„ˆ ์žˆ์–ด์š”
์˜คํ”ˆ์†Œ์Šค์— ๊ธฐ์—ฌํ•  ๋•Œ ํ•ด๋„ ๋˜๋Š” ์ผ๊ณผ ํ•˜๋ฉด ์•ˆ๋˜๋Š” ์ผ
Lessons from maintaining Mocha, an open source project
๊ฐœ๋ฐœ ๊ด€๋ จ ๊ธฐ์ˆ  ๋ธ”๋กœ๊ทธ ์šด์˜ํ•˜๊ธฐ
Terraform์„ ์ด์šฉํ•œ Infrastructure as Code ์‹ค์ „ ๊ตฌ์„ฑํ•˜๊ธฐ
์˜คํ”ˆ์†Œ์Šค ์ƒํƒœ๊ณ„ ์ผ์›์œผ๋กœ์„œ์˜ ๊ฐœ๋ฐœ์ž(์ž๋ง‰ ๋ฒ„์ „)
์˜คํ”ˆ์†Œ์Šค ์ƒํƒœ๊ณ„ ์ผ์›์œผ๋กœ์„œ์˜ ๊ฐœ๋ฐœ์ž
Node.js API ์„œ๋ฒ„ ์„ฑ๋Šฅ ๊ฐœ์„ ๊ธฐ
Node.js ํ˜„์žฌ์™€ ๋ฏธ๋ž˜
Nodejs Production ์ ์šฉ๊ธฐ
Sublime Text tips & trikcs
Popular Convention ๊ฐœ๋ฐœ๊ธฐ
Spring Scala : ์Šคํ”„๋ง์ด ์Šค์นผ๋ผ๋ฅผ ๋งŒ๋‚ฌ์„ ๋•Œ

Recently uploaded (20)

PPTX
breach-and-attack-simulation-cybersecurity-india-chennai-defenderrabbit-2025....
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
GDG Cloud Iasi [PUBLIC] Florian Blaga - Unveiling the Evolution of Cybersecur...
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
madgavkar20181017ppt McKinsey Presentation.pdf
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Modernizing your data center with Dell and AMD
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
ย 
PDF
Machine learning based COVID-19 study performance prediction
PDF
KodekX | Application Modernization Development
ย 
PDF
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
PDF
GamePlan Trading System Review: Professional Trader's Honest Take
PPT
Teaching material agriculture food technology
PPT
โ€œAI and Expert System Decision Support & Business Intelligence Systemsโ€
PDF
Advanced IT Governance
breach-and-attack-simulation-cybersecurity-india-chennai-defenderrabbit-2025....
Diabetes mellitus diagnosis method based random forest with bat algorithm
GDG Cloud Iasi [PUBLIC] Florian Blaga - Unveiling the Evolution of Cybersecur...
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Network Security Unit 5.pdf for BCA BBA.
madgavkar20181017ppt McKinsey Presentation.pdf
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
NewMind AI Weekly Chronicles - August'25 Week I
Modernizing your data center with Dell and AMD
Dropbox Q2 2025 Financial Results & Investor Presentation
ย 
Machine learning based COVID-19 study performance prediction
KodekX | Application Modernization Development
ย 
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
GamePlan Trading System Review: Professional Trader's Honest Take
Teaching material agriculture food technology
โ€œAI and Expert System Decision Support & Business Intelligence Systemsโ€
Advanced IT Governance

Coffeescript - Getting Started