SlideShare a Scribd company logo
JavaScript Code Academy
Introduction
Welcome!
And you?
Course content
Course content
Every week on Wednesday, eight sessions
Starting at 6 pm, 20 mins for asking, 6:30 pm presentation & coding
Syllabus (might be adjusted to your needs)
React.js basics
Unit testing
Managing application state
Dealing with async
Today ...
Introduction
Git, Github, Discussion forum
Brief JavaScript history & glossary
Setup environment
JavaScript basics
Git, Github, coding ...
All materials & code on Github: https://github.com/msd-code-academy
Discussion: http://discourse.js-code-academy.eu/
Common flow:
a. Fork the original repository
b. Clone it on your machine
c. Create feature branch
d. Push changes & create pull request
Do It!
- Install git
- Create Github account
- Register at discourse.js-code-academy.eu
Brief intro to JavaScript history & glossary
JavaScript history & glossary
Developed in 10 days at Netscape by Brendan Eich
Called Mocha -> LiveScript -> JavaScript
JavaScript - marketing name (because Java was cool back then)
EcmaScript - standard
Versioning: 1, 2, 3, 4, 5, 5.1, 6 => 2015, 7 => 2016
Node.js - JavaScript interpreter for server
Do it!
Setup your environment: https://github.com/msd-code-
academy/lessons/blob/master/introduction/environment.md
JavaScript basics
JavaScript right now...
JavaScript basics - functions
function returnSomething(param) {
Return 'I am hoisted';
}
var anonymous = function() {
return 'I am anonymous';
};
const fatArrow = () => 'I am lambda & ES6 only!';
new Function('a', 'b', 'return a + b'); // don't do it
JavaScript basics - functions & scope
var getA = function() {
var a = 'AAA';
var hello = 'Hello!';
var getB = function() {
var b = 'BBB';
var getC =
function() {
var c =
'CCC';
var hello
= 'Hi!';
console.log(a, b, c);
console.log(hello);
};
getC();
each function defines new scope
code in inner (child) scope can access
variables defined in outer (parent) scope
variables defined in current scope take
precedence over variables in parent
scope
JavaScript basics - higher order functions
Functions are just regular values:
They can be passed as an argument to other
functions
Function can return another function
=> might help you with abstraction
names.map(
(name) => name.substr(0, 1).toUpperCase() + name.substr(1)
)
const newNames = [];
for (var i = 0; i < names.length; i++){
const name = names[i]
const newName = name
.substr(0,1)
.toUpperCase() + name.substr(1);
newNames.push(newName);
}
JavaScript basics - this identifier
Refers to the “context” in which the function is called
It’s not the reference to scope
Any sufficiently advanced technology is indistinguishable from magic. -- Arthur C. Clarke
const hasClass = function (className) {
return this.classList.contains(className);
};
const e = document.querySelector('#elem');
hasClass.call(e);
hasClass.call({}); // Cannot read property 'contains' of undefined
const imprisoned = hasClass.bind(e);
imprisoned();
JavaScript basics - this identifier & fat arrow function
Fat arrow function binds the context at the creation, that’s it:
class Anderson {
constructor() {
this.name = 'Neo';
this.getName = () => this.name;
this.getName2 = function () {
return this.name;
};
}
}
const a = new Anderson();
const getName = a.getName;
const getName2 = a.getName2;
console.log(getName());
console.log(getName2()); // Error: Cannot read property 'name' of undefined, Matrix down
Do It!
Fork, clone, fix, push:
https://github.com/msd-code-
academy/lessons/blob/master/introduction/intro_to_js.md#javascript
-crash-course
Npm, package.json & you first project
Npm.js + package.json
Gate to the world: https://www.npmjs.com/
Check the usage stats, issues & code if in doubts
Define your own scripts:
=> see & run “npm run hello” from previous exercise
Defining dependencies:
Dependencies
devDependencies
Do It!
Install, start, develop:
https://github.com/msd-code-
academy/lessons/blob/master/introduction/environment.md#run-hello-
world-application

More Related Content

ODP
GulpJs - An Introduction
PPTX
Introduction to Gulp
PDF
Gulp - the streaming build system
PDF
Improving your workflow with gulp
PDF
Intro to Gulp
PDF
Gulp: Your Build Process Will Thank You
PDF
Angular workflow with gulp.js
PPTX
JavaScript Task Runners - Gulp & Grunt
GulpJs - An Introduction
Introduction to Gulp
Gulp - the streaming build system
Improving your workflow with gulp
Intro to Gulp
Gulp: Your Build Process Will Thank You
Angular workflow with gulp.js
JavaScript Task Runners - Gulp & Grunt

What's hot (20)

PPTX
Automated Development Workflow with Gulp
PDF
Devenez le plus heureux des Front-end avec Gulp.js
PPTX
Gulp: Task Runner
PDF
Gulp - The Streaming Build System
PDF
Frontend JS workflow - Gulp 4 and the like
PDF
Automating your workflow with Gulp.js
PDF
funcs, func expressions, closure, returning funcs, recursion, the stack -goph...
PPTX
Writing data analysis pipeline as ruby gem
ODP
Introduction to GulpJs
PPTX
Introduzione a GitHub Actions (beta)
PPT
Collaboration With Git and GitHub
PDF
Getting started with gulpjs
PDF
Web development tools { starter pack }
PDF
60分鐘完送百萬edm,背後雲端ci/cd實戰大公開
PDF
Screenshot as a service
PDF
The Secrets of The FullStack Ninja - Part A - Session I
PDF
[Kotlin Serverless 工作坊] 單元 4 - 實作 RSS Aggregator
PDF
Devfest 2021' - Artifact Registry Introduction (Taipei)
PDF
TDC2016SP - Esqueça Grunt ou Gulp. Webpack and NPM rule them all!
Automated Development Workflow with Gulp
Devenez le plus heureux des Front-end avec Gulp.js
Gulp: Task Runner
Gulp - The Streaming Build System
Frontend JS workflow - Gulp 4 and the like
Automating your workflow with Gulp.js
funcs, func expressions, closure, returning funcs, recursion, the stack -goph...
Writing data analysis pipeline as ruby gem
Introduction to GulpJs
Introduzione a GitHub Actions (beta)
Collaboration With Git and GitHub
Getting started with gulpjs
Web development tools { starter pack }
60分鐘完送百萬edm,背後雲端ci/cd實戰大公開
Screenshot as a service
The Secrets of The FullStack Ninja - Part A - Session I
[Kotlin Serverless 工作坊] 單元 4 - 實作 RSS Aggregator
Devfest 2021' - Artifact Registry Introduction (Taipei)
TDC2016SP - Esqueça Grunt ou Gulp. Webpack and NPM rule them all!
Ad

Viewers also liked (20)

PPTX
Grunt and Bower
PPTX
Code Academy launch presentation
PDF
Customers Before Code – Music Startup Academy, May 12, 2015
PPTX
Bower introduction
PDF
DevOps - from idea to production
PDF
NodeJS for Mobile App
PDF
The Ring programming language version 1.2 book - Part 71 of 84
PDF
Zorgstandaard THL Kinderen & Jongeren
PPTX
Robots leone y juli
PDF
The future [of pixels] is in our hands (first draft)
PPTX
Diapositivas
PPTX
التشبيه التمثيلي
PPTX
черные дыры
DOCX
Financing company
PDF
W7 57-010126-2009-8
PPTX
Epoker
PDF
PPTX
Quand utiliser MongoDB … Et quand vous en passer…
PDF
JavaScript dans l'usine logicielle
PDF
Respuesta ONUDC exportación de coca
Grunt and Bower
Code Academy launch presentation
Customers Before Code – Music Startup Academy, May 12, 2015
Bower introduction
DevOps - from idea to production
NodeJS for Mobile App
The Ring programming language version 1.2 book - Part 71 of 84
Zorgstandaard THL Kinderen & Jongeren
Robots leone y juli
The future [of pixels] is in our hands (first draft)
Diapositivas
التشبيه التمثيلي
черные дыры
Financing company
W7 57-010126-2009-8
Epoker
Quand utiliser MongoDB … Et quand vous en passer…
JavaScript dans l'usine logicielle
Respuesta ONUDC exportación de coca
Ad

Similar to JavaScript code academy - introduction (20)

PDF
The mighty js_function
PPT
Object Oriented JavaScript
PDF
Js in-ten-minutes
PDF
PDF
Introjs10.5.17SD
PPT
Javascript quiz. Questions to ask when recruiting developers.
PPTX
Lecture 5: Client Side Programming 1
PDF
JavaScript Basics and Best Practices - CC FE & UX
PPTX
Week 6 java script loops
PDF
Intro to JavaScript: FUNdamentals (3/7/18)
PPTX
Web technologies-course 08.pptx
PDF
Itjsf49
PDF
Introjs1.9.18tf
PDF
JavaScript Primer
PPTX
LinkedIn TBC JavaScript 100: Intro
PDF
Basics of JavaScript
PDF
Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-9-52-74-451
PDF
Deck 893ff61f-1fb8-4e15-a379-775dfdbcee77-7-14-55-78 (12)
PPT
A Deeper look into Javascript Basics
The mighty js_function
Object Oriented JavaScript
Js in-ten-minutes
Introjs10.5.17SD
Javascript quiz. Questions to ask when recruiting developers.
Lecture 5: Client Side Programming 1
JavaScript Basics and Best Practices - CC FE & UX
Week 6 java script loops
Intro to JavaScript: FUNdamentals (3/7/18)
Web technologies-course 08.pptx
Itjsf49
Introjs1.9.18tf
JavaScript Primer
LinkedIn TBC JavaScript 100: Intro
Basics of JavaScript
Deck 8983a1d9-68df-4447-8481-3b4fd0de734c-9-52-74-451
Deck 893ff61f-1fb8-4e15-a379-775dfdbcee77-7-14-55-78 (12)
A Deeper look into Javascript Basics

Recently uploaded (20)

PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
KodekX | Application Modernization Development
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
GDG Cloud Iasi [PUBLIC] Florian Blaga - Unveiling the Evolution of Cybersecur...
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPT
Teaching material agriculture food technology
PDF
Advanced Soft Computing BINUS July 2025.pdf
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Machine learning based COVID-19 study performance prediction
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PPTX
MYSQL Presentation for SQL database connectivity
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Advanced IT Governance
PDF
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
PDF
Empathic Computing: Creating Shared Understanding
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
KodekX | Application Modernization Development
NewMind AI Weekly Chronicles - August'25 Week I
GDG Cloud Iasi [PUBLIC] Florian Blaga - Unveiling the Evolution of Cybersecur...
“AI and Expert System Decision Support & Business Intelligence Systems”
Teaching material agriculture food technology
Advanced Soft Computing BINUS July 2025.pdf
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Machine learning based COVID-19 study performance prediction
Network Security Unit 5.pdf for BCA BBA.
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
MYSQL Presentation for SQL database connectivity
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Mobile App Security Testing_ A Comprehensive Guide.pdf
Advanced IT Governance
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
Empathic Computing: Creating Shared Understanding

JavaScript code academy - introduction

  • 4. Course content Every week on Wednesday, eight sessions Starting at 6 pm, 20 mins for asking, 6:30 pm presentation & coding Syllabus (might be adjusted to your needs) React.js basics Unit testing Managing application state Dealing with async
  • 5. Today ... Introduction Git, Github, Discussion forum Brief JavaScript history & glossary Setup environment JavaScript basics
  • 6. Git, Github, coding ... All materials & code on Github: https://github.com/msd-code-academy Discussion: http://discourse.js-code-academy.eu/ Common flow: a. Fork the original repository b. Clone it on your machine c. Create feature branch d. Push changes & create pull request
  • 7. Do It! - Install git - Create Github account - Register at discourse.js-code-academy.eu
  • 8. Brief intro to JavaScript history & glossary
  • 9. JavaScript history & glossary Developed in 10 days at Netscape by Brendan Eich Called Mocha -> LiveScript -> JavaScript JavaScript - marketing name (because Java was cool back then) EcmaScript - standard Versioning: 1, 2, 3, 4, 5, 5.1, 6 => 2015, 7 => 2016 Node.js - JavaScript interpreter for server
  • 10. Do it! Setup your environment: https://github.com/msd-code- academy/lessons/blob/master/introduction/environment.md
  • 12. JavaScript basics - functions function returnSomething(param) { Return 'I am hoisted'; } var anonymous = function() { return 'I am anonymous'; }; const fatArrow = () => 'I am lambda & ES6 only!'; new Function('a', 'b', 'return a + b'); // don't do it
  • 13. JavaScript basics - functions & scope var getA = function() { var a = 'AAA'; var hello = 'Hello!'; var getB = function() { var b = 'BBB'; var getC = function() { var c = 'CCC'; var hello = 'Hi!'; console.log(a, b, c); console.log(hello); }; getC(); each function defines new scope code in inner (child) scope can access variables defined in outer (parent) scope variables defined in current scope take precedence over variables in parent scope
  • 14. JavaScript basics - higher order functions Functions are just regular values: They can be passed as an argument to other functions Function can return another function => might help you with abstraction names.map( (name) => name.substr(0, 1).toUpperCase() + name.substr(1) ) const newNames = []; for (var i = 0; i < names.length; i++){ const name = names[i] const newName = name .substr(0,1) .toUpperCase() + name.substr(1); newNames.push(newName); }
  • 15. JavaScript basics - this identifier Refers to the “context” in which the function is called It’s not the reference to scope Any sufficiently advanced technology is indistinguishable from magic. -- Arthur C. Clarke const hasClass = function (className) { return this.classList.contains(className); }; const e = document.querySelector('#elem'); hasClass.call(e); hasClass.call({}); // Cannot read property 'contains' of undefined const imprisoned = hasClass.bind(e); imprisoned();
  • 16. JavaScript basics - this identifier & fat arrow function Fat arrow function binds the context at the creation, that’s it: class Anderson { constructor() { this.name = 'Neo'; this.getName = () => this.name; this.getName2 = function () { return this.name; }; } } const a = new Anderson(); const getName = a.getName; const getName2 = a.getName2; console.log(getName()); console.log(getName2()); // Error: Cannot read property 'name' of undefined, Matrix down
  • 17. Do It! Fork, clone, fix, push: https://github.com/msd-code- academy/lessons/blob/master/introduction/intro_to_js.md#javascript -crash-course
  • 18. Npm, package.json & you first project
  • 19. Npm.js + package.json Gate to the world: https://www.npmjs.com/ Check the usage stats, issues & code if in doubts Define your own scripts: => see & run “npm run hello” from previous exercise Defining dependencies: Dependencies devDependencies
  • 20. Do It! Install, start, develop: https://github.com/msd-code- academy/lessons/blob/master/introduction/environment.md#run-hello- world-application