SlideShare a Scribd company logo
Creative Web 2.
Git, like subversion (svn), is a…

free versioning system
A versioning system…

saves changes to files in commits, !
this keeps changes flexible and !
file sizes small.
Github is a…

platform to collaborate using git !
repositories
Setting up git & github
1. get a free github.com account"
2. download & install the github app"
• https://mac.github.com/"
• https://windows.github.com/"
3. Read the tutorial https://mac.github.com/
help.html
A commit consists of…

a commit message and the changes!
to a file
A commit message…

should give you a brief idea of what
changed with this commit
Any file can be committed…

code, image files, text documents, !
presentations, …
An introduction to

JavaScript
Linking external javascript files!
"
<script type="text/javascript" 

src=“./libs/js/script.js"></script>"
"
src is the relative or absolute path to the file."
"
type tells the brows what kind of script it is and"
always needs to be text/javascript."
In a JavaScript file…

you can start writing js without any!
more declarations.
A variable is a container…

that stores a value.
Variables!
"
Variables always need to be declared using the "
var keyword."
"
Otherwise they are defined globally, which could !
lead to performance and security problems.!
JavaScript has 4 types of variables!
"
• string (text)!
• number (integer e.g. 3 or float e.g. 1.2)!
• object (key-value pairs)!
• array (key-value pairs with numbered keys)
String!
"
var variableName = ‘string’;"
"
A string is a simple text which needs to be "
surrounded by single quotation marks."
Number!
"
var variableInt = 2; // integer"
var variableFloat = 1.3; // float"
"
A number is defined without quotation marks."
Objects!
"
var obj = { "
" ‘name’: ’Max’, "
" ‘gender’: ’male’"
};"
"
Objects are key-value pairs separated by :"
The key has to be a string. The value may be a"
string, object or even a function. "
Objects!
"
varObject.name "
=> returns: Max"
varObject[‘gender’] "
=> returns: male"
"
Object values are retrieved using the "
dot-notation objectName.key or the "
array-notation objectName[key].!
Array objects!
"
var arr = [ ‘item’, ’item 2’ ];"
Arrays are special objects. The key is assigned
automatically and is an index (integer) starting "
from 0."
Array objects!
"
arr[0] "
=> returns: item"
"
Array object values are retrieved using the "
array-notation arrayName[key].!
A function…

is a collection of commands.
Function!
"
var testFn = function( arguments ){"
" // function code here"
};"
"
Functions are stored to a variable and accept"
arguments."
Function!
"
console.log( ‘message’ );"
"
To call a function use its name and provide "
arguments if needed."
Function!
"
var helloWorld = function( name ){"
" var say = ‘Hello ’+name+’.’;"
" console.log(say);"
};"
"
helloWorld(‘Peter’);"
=> returns: Hello Peter"
"
You can call functions within functions and define "
variables within functions.
The idea of scope defines…

where something is available.!
"
You can’t access something that is"
out of scope.
Global scope!
"
varName = ‘test’;"
"
Available everywhere. DO NOT USE THIS.
Local scope!
"
var varName = ‘test’; // inside the js document"
"
Available everywhere within the document.
Local scope in function!
"
var fn( ){"
var varName = ‘test’;"
console.log(varName); // returns: test"
};"
"
console.log(varName); // returns: undefined"
"
Available within the function. Arguments are "
always local variables to a function.
Assignments
1. Write an html pages and include an external js file."
•add a local variable"
•add a function which does something with an 

argument"
•add a local variable to the function

2. Add an external css file and try the following"
•use a css3 gradient on an html element"
•use a transition on something using the :hover 

pseudo-class"
•use a box-shadow"
•use border-radius on something
Lukas Oppermann
lukas@vea.re

More Related Content

PPTX
JavaScript Sprachraum
PDF
Workshop 23: ReactJS, React & Redux testing
PDF
Angular promises and http
KEY
jQuery - Tips And Tricks
PDF
Angular server-side communication
PPTX
Javascript And J Query
KEY
Sprout core and performance
PDF
Présentation de HomeKit
JavaScript Sprachraum
Workshop 23: ReactJS, React & Redux testing
Angular promises and http
jQuery - Tips And Tricks
Angular server-side communication
Javascript And J Query
Sprout core and performance
Présentation de HomeKit

What's hot (20)

PDF
AddressBook.swift
PDF
Icinga2 api use cases
PDF
Protocol-Oriented MVVM
PPTX
Method and decorator
PDF
Codegeneration With Xtend
PPTX
Workshop 1: Good practices in JavaScript
PPTX
Introduction to underscore.js
PDF
Node Boot Camp
PDF
Auto-GWT : Better GWT Programming with Xtend
PPTX
Typescript barcelona
PDF
NestJS
PDF
Android L01 - Warm Up
PPTX
Introduction to Underscore.js
PPS
Underscore
PDF
Practical Protocols with Associated Types
PDF
Mirage For Beginners
PPTX
Avoiding callback hell in Node js using promises
KEY
Gwt and Xtend
KEY
Underscore.js
PDF
Rails3 changesets
AddressBook.swift
Icinga2 api use cases
Protocol-Oriented MVVM
Method and decorator
Codegeneration With Xtend
Workshop 1: Good practices in JavaScript
Introduction to underscore.js
Node Boot Camp
Auto-GWT : Better GWT Programming with Xtend
Typescript barcelona
NestJS
Android L01 - Warm Up
Introduction to Underscore.js
Underscore
Practical Protocols with Associated Types
Mirage For Beginners
Avoiding callback hell in Node js using promises
Gwt and Xtend
Underscore.js
Rails3 changesets
Ad

Viewers also liked (15)

PDF
Gabriela DE Trend Scout
PPT
Категория или "креатифф"?
PDF
Ewrt 1 c with lit crit spring 2014 2
PPT
RST2014_Krasnoyarsk_InnovativeProtectionofRailwayInfrastructure
PPTX
How did you attract/address your audience?
PPTX
Cmp2015 ritsumei takeda
PPTX
20130425 red hot hack
PPTX
Kambbank
PPT
Market update 20140417
PDF
Tap the game app market with these three deas
PPTX
Hämeen ammattikorkeakoulun AVO2-hankkeen Kinect-pilotit: kokemuksia ja palaut...
PPTX
Inleiding Praktijkmiddag dienstverlening 15 april in Gouda def
PDF
Nhom01 baocao1
PPT
Super презентация Super Маркетинга ДСУД Ланит
PDF
10 éve magyarul
Gabriela DE Trend Scout
Категория или "креатифф"?
Ewrt 1 c with lit crit spring 2014 2
RST2014_Krasnoyarsk_InnovativeProtectionofRailwayInfrastructure
How did you attract/address your audience?
Cmp2015 ritsumei takeda
20130425 red hot hack
Kambbank
Market update 20140417
Tap the game app market with these three deas
Hämeen ammattikorkeakoulun AVO2-hankkeen Kinect-pilotit: kokemuksia ja palaut...
Inleiding Praktijkmiddag dienstverlening 15 april in Gouda def
Nhom01 baocao1
Super презентация Super Маркетинга ДСУД Ланит
10 éve magyarul
Ad

Similar to Creative Web 2 - JavaScript (20)

PPTX
Scripting as a Second Language
PPTX
Art of Javascript
PPT
JavaScript Workshop
PDF
The Ring programming language version 1.2 book - Part 5 of 84
PDF
Vb script tutorial for qtp[1]
PPTX
Angular JS
KEY
Getting the most out of Java [Nordic Coding-2010]
PPT
Play!ng with scala
PDF
JavaScript Robotics
PPT
Javascript Workshop
PPT
JavaScript Basics
PDF
The Ring programming language version 1.9 book - Part 54 of 210
PPTX
Real World MVC
DOCX
descriptive programming
PDF
Developing Useful APIs
PDF
Ingo Muschenetz: Titanium Studio Deep Dive
PPTX
Introduction to Client-Side Javascript
ZIP
Barcamp Auckland Rails3 presentation
PPTX
SenchaCon 2016: Learn the Top 10 Best ES2015 Features - Lee Boonstra
Scripting as a Second Language
Art of Javascript
JavaScript Workshop
The Ring programming language version 1.2 book - Part 5 of 84
Vb script tutorial for qtp[1]
Angular JS
Getting the most out of Java [Nordic Coding-2010]
Play!ng with scala
JavaScript Robotics
Javascript Workshop
JavaScript Basics
The Ring programming language version 1.9 book - Part 54 of 210
Real World MVC
descriptive programming
Developing Useful APIs
Ingo Muschenetz: Titanium Studio Deep Dive
Introduction to Client-Side Javascript
Barcamp Auckland Rails3 presentation
SenchaCon 2016: Learn the Top 10 Best ES2015 Features - Lee Boonstra

More from Lukas Oppermann (10)

PDF
BTK Designing for the web 2016 - UX
PDF
BTK Designing for the web 2016
PDF
Btk creative-web-03
PDF
Creative Web 02 - HTML & CSS Basics
PDF
Creative Web 01 - Introduction to the web & web development
PDF
Creative Web 2 - CSS
PDF
Creative Web 2 - Introduction
PDF
Contemporary webdesign day 2
PDF
Contemporary webdesign
PDF
Search Engine Optimization Introduction
BTK Designing for the web 2016 - UX
BTK Designing for the web 2016
Btk creative-web-03
Creative Web 02 - HTML & CSS Basics
Creative Web 01 - Introduction to the web & web development
Creative Web 2 - CSS
Creative Web 2 - Introduction
Contemporary webdesign day 2
Contemporary webdesign
Search Engine Optimization Introduction

Recently uploaded (20)

PDF
Modernizing your data center with Dell and AMD
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
Big Data Technologies - Introduction.pptx
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
KodekX | Application Modernization Development
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
cuic standard and advanced reporting.pdf
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Approach and Philosophy of On baking technology
PDF
Machine learning based COVID-19 study performance prediction
Modernizing your data center with Dell and AMD
Per capita expenditure prediction using model stacking based on satellite ima...
Building Integrated photovoltaic BIPV_UPV.pdf
Big Data Technologies - Introduction.pptx
NewMind AI Weekly Chronicles - August'25 Week I
“AI and Expert System Decision Support & Business Intelligence Systems”
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Spectral efficient network and resource selection model in 5G networks
KodekX | Application Modernization Development
Diabetes mellitus diagnosis method based random forest with bat algorithm
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
cuic standard and advanced reporting.pdf
Advanced methodologies resolving dimensionality complications for autism neur...
Mobile App Security Testing_ A Comprehensive Guide.pdf
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Approach and Philosophy of On baking technology
Machine learning based COVID-19 study performance prediction

Creative Web 2 - JavaScript

  • 2. Git, like subversion (svn), is a…
 free versioning system
  • 3. A versioning system…
 saves changes to files in commits, ! this keeps changes flexible and ! file sizes small.
  • 4. Github is a…
 platform to collaborate using git ! repositories
  • 5. Setting up git & github
  • 6. 1. get a free github.com account" 2. download & install the github app" • https://mac.github.com/" • https://windows.github.com/" 3. Read the tutorial https://mac.github.com/ help.html
  • 7. A commit consists of…
 a commit message and the changes! to a file
  • 8. A commit message…
 should give you a brief idea of what changed with this commit
  • 9. Any file can be committed…
 code, image files, text documents, ! presentations, …
  • 11. Linking external javascript files! " <script type="text/javascript" 
 src=“./libs/js/script.js"></script>" " src is the relative or absolute path to the file." " type tells the brows what kind of script it is and" always needs to be text/javascript."
  • 12. In a JavaScript file…
 you can start writing js without any! more declarations.
  • 13. A variable is a container…
 that stores a value.
  • 14. Variables! " Variables always need to be declared using the " var keyword." " Otherwise they are defined globally, which could ! lead to performance and security problems.!
  • 15. JavaScript has 4 types of variables! " • string (text)! • number (integer e.g. 3 or float e.g. 1.2)! • object (key-value pairs)! • array (key-value pairs with numbered keys)
  • 16. String! " var variableName = ‘string’;" " A string is a simple text which needs to be " surrounded by single quotation marks."
  • 17. Number! " var variableInt = 2; // integer" var variableFloat = 1.3; // float" " A number is defined without quotation marks."
  • 18. Objects! " var obj = { " " ‘name’: ’Max’, " " ‘gender’: ’male’" };" " Objects are key-value pairs separated by :" The key has to be a string. The value may be a" string, object or even a function. "
  • 19. Objects! " varObject.name " => returns: Max" varObject[‘gender’] " => returns: male" " Object values are retrieved using the " dot-notation objectName.key or the " array-notation objectName[key].!
  • 20. Array objects! " var arr = [ ‘item’, ’item 2’ ];" Arrays are special objects. The key is assigned automatically and is an index (integer) starting " from 0."
  • 21. Array objects! " arr[0] " => returns: item" " Array object values are retrieved using the " array-notation arrayName[key].!
  • 22. A function…
 is a collection of commands.
  • 23. Function! " var testFn = function( arguments ){" " // function code here" };" " Functions are stored to a variable and accept" arguments."
  • 24. Function! " console.log( ‘message’ );" " To call a function use its name and provide " arguments if needed."
  • 25. Function! " var helloWorld = function( name ){" " var say = ‘Hello ’+name+’.’;" " console.log(say);" };" " helloWorld(‘Peter’);" => returns: Hello Peter" " You can call functions within functions and define " variables within functions.
  • 26. The idea of scope defines…
 where something is available.! " You can’t access something that is" out of scope.
  • 27. Global scope! " varName = ‘test’;" " Available everywhere. DO NOT USE THIS.
  • 28. Local scope! " var varName = ‘test’; // inside the js document" " Available everywhere within the document.
  • 29. Local scope in function! " var fn( ){" var varName = ‘test’;" console.log(varName); // returns: test" };" " console.log(varName); // returns: undefined" " Available within the function. Arguments are " always local variables to a function.
  • 30. Assignments 1. Write an html pages and include an external js file." •add a local variable" •add a function which does something with an 
 argument" •add a local variable to the function
 2. Add an external css file and try the following" •use a css3 gradient on an html element" •use a transition on something using the :hover 
 pseudo-class" •use a box-shadow" •use border-radius on something