SlideShare a Scribd company logo
Lecture 3: Additional
Materials for ES6

ES6 on Windows + More ES6 + More
Exercises
Kobkrit Viriyayudhakorn, Ph.D.
CEO of iApp Technology Limited.
kobkrit@gmail.com
http://www.kobkrit.com
All source code
• https://github.com/kobkrit/learn-react-native
How to try ES6 and Beyond
with on Windows
(1) Open Command Line with “Run as Administrator”
(2) Create Directory at C:es6 and then run “npm init”
(3) Press Enter Many Times Until All Questions are Answered
(4) npm install --save-dev babel-cli 

babel-preset-stage-0
(4) notepad link.cmd
(5) Type “doskey babel-node=.node_modules.binbabel-
node $*” and hit file > save
(6) Go back to command line, type “link.cmd”
(7) echo {"presets":["stage-0"]} > .babelrc
(8) notepad 1.js
(9) Type down some ES6 code, e.g., 

console.log(‘Hello World!’); + Hit Save
(10) babel-node 1.js
Alias is not persistence!
• If you closed the command line windows, enter c:
es6 again, and always run link.cmd
• Open command line program
• cd c:es6
• link.cmd
• babel-node somefile.js
More on .
Math
[React Native Tutorial] Lecture 3: More on ES6/ES2015
Set
Exercise
(1) Write down a function that sum every element in
array. E.g. sumArray([12,3,4,1,2,3]) = 25
sumArray([12,3,4,1,2,3]); //=> 25



sumArray([1,2,3]); //=> 6
function sumArray(arr){
}
Exercise
(2) Write function that count word size case-insensitively.
wordHistogram('Hello world hello earth')
//=> {hello : 2, world : 1, earth : 1 }
wordHistogram('dog eat cat cat eat dog')
//=> {dog : 2, eat : 2, cat : 2 }
wordHistogram('Na na na na na na na na na
na na na na na na na na na na na na na na
na Batman!’)
//=> {Batman! : 1, na: 24}
(https://www.youtube.com/watch?v=EtoMN_xi-AM)
function wordHistogram(str){
}
Exercises
(3) Write the function that can unions two arrays and
sort it ascendingly.
unionsAndSort([5,3,2],[1,4,5]) // =>
[1,2,3,4,5,5]
unionsAndSort([1,2,3],[4]) // =>
[1,2,3,4]
function unionsAndSort(a,b){
}
Exercises
(4) Write the function that select only words that start
with letter ‘a’ or ‘A’ in a string.
onlyStartWithA(‘angulus is an angle in
latin’); //=> ‘angulus an angle’
onlyStartWithA(‘apple is not an
animal’); //=> ‘apple an animal’
function onlyStartWithA(str){
}
Exercises
(5) Reverse Digits of an Integer
reverseDigit(123); //=> 321

reverseDigit(-456); //=> 654
function reverseDigit(num){
}

More Related Content

What's hot (20)

PDF
CP3108B (Mozilla) Sharing Session on Add-on SDK
Mifeng
 
PDF
Complete MVC on NodeJS
Hüseyin BABAL
 
PDF
Vagrant plugin development intro
Budh Ram Gurung
 
PDF
Introduction to REST API with Node.js
Yoann Gotthilf
 
PDF
Asciidoctor, because documentation does not have to suck
Andres Almiray
 
ODP
Nodejs Intro - Part2 Introduction to Web Applications
Budh Ram Gurung
 
PPT
Nodejs Intro Part One
Budh Ram Gurung
 
PDF
ORMs in Golang
Ikenna Okpala
 
PDF
Node.js
Jan Dillmann
 
PDF
Testing with Express, Mocha & Chai
Joerg Henning
 
PDF
Drupal + selenium
hernanibf
 
PPTX
Node.js in a heterogeneous system
Alexey (Mr_Mig) Migutsky
 
PDF
Writing documentation with Asciidoctor
Jérémie Bresson
 
ODP
SockJS Intro
Ngoc Dao
 
PDF
Reliable Python REST API (by Volodymyr Hotsyk) - Web Back-End Tech Hangout - ...
Innovecs
 
PDF
Non-blocking I/O, Event loops and node.js
Marcus Frödin
 
PDF
Celery introduction
Ionel Mărieș Cristian
 
PDF
2015-10-07 PPDC HTTP Adapters
awwaiid
 
PPTX
A slightly advanced introduction to node.js
Sudar Muthu
 
PDF
10 Useful Asciidoctor Tips
Andres Almiray
 
CP3108B (Mozilla) Sharing Session on Add-on SDK
Mifeng
 
Complete MVC on NodeJS
Hüseyin BABAL
 
Vagrant plugin development intro
Budh Ram Gurung
 
Introduction to REST API with Node.js
Yoann Gotthilf
 
Asciidoctor, because documentation does not have to suck
Andres Almiray
 
Nodejs Intro - Part2 Introduction to Web Applications
Budh Ram Gurung
 
Nodejs Intro Part One
Budh Ram Gurung
 
ORMs in Golang
Ikenna Okpala
 
Node.js
Jan Dillmann
 
Testing with Express, Mocha & Chai
Joerg Henning
 
Drupal + selenium
hernanibf
 
Node.js in a heterogeneous system
Alexey (Mr_Mig) Migutsky
 
Writing documentation with Asciidoctor
Jérémie Bresson
 
SockJS Intro
Ngoc Dao
 
Reliable Python REST API (by Volodymyr Hotsyk) - Web Back-End Tech Hangout - ...
Innovecs
 
Non-blocking I/O, Event loops and node.js
Marcus Frödin
 
Celery introduction
Ionel Mărieș Cristian
 
2015-10-07 PPDC HTTP Adapters
awwaiid
 
A slightly advanced introduction to node.js
Sudar Muthu
 
10 Useful Asciidoctor Tips
Andres Almiray
 

Viewers also liked (17)

PDF
[React Native] Lecture 4: Basic Elements and UI Layout by using FlexBox
Kobkrit Viriyayudhakorn
 
PDF
React Native Introduction: Making Real iOS and Android Mobile App By JavaScript
Kobkrit Viriyayudhakorn
 
PDF
Lecture 3 - ES6 Script Advanced for React-Native
Kobkrit Viriyayudhakorn
 
PDF
[React-Native Tutorial] Map
Kobkrit Viriyayudhakorn
 
PPTX
Using React Native in a digital health solution
vincentlaulagnet
 
PPTX
React Native + Redux, a game changer for mobile application development?
vincentlaulagnet
 
PDF
React Native Firebase Realtime Database + Authentication
Kobkrit Viriyayudhakorn
 
PDF
[React-Native Tutorial] Lecture 8: Midterm Exam Discussion, Feedback, and Ter...
Kobkrit Viriyayudhakorn
 
PDF
React-Native Lecture 11: In App Storage
Kobkrit Viriyayudhakorn
 
PDF
สร้างซอฟต์แวร์อย่างไรให้โดนใจผู้คน (How to make software that people love)
Kobkrit Viriyayudhakorn
 
PDF
React Native Firebase
Kobkrit Viriyayudhakorn
 
PDF
[React-Native Tutorial 10] Camera Roll / Gallery / Camera / Native Modules by...
Kobkrit Viriyayudhakorn
 
PDF
Startup Pitching and Mobile App Startup
Kobkrit Viriyayudhakorn
 
PDF
[React Native Tutorial] Lecture 5: Input and State
Kobkrit Viriyayudhakorn
 
PDF
[React Native Tutorial] Lecture 6: Component, Props, and Network
Kobkrit Viriyayudhakorn
 
PDF
[React Native Tutorial] Lecture 7: Navigation - Scene Transition - ListView
Kobkrit Viriyayudhakorn
 
PDF
Lecture 2: ES6 / ES2015 Slide
Kobkrit Viriyayudhakorn
 
[React Native] Lecture 4: Basic Elements and UI Layout by using FlexBox
Kobkrit Viriyayudhakorn
 
React Native Introduction: Making Real iOS and Android Mobile App By JavaScript
Kobkrit Viriyayudhakorn
 
Lecture 3 - ES6 Script Advanced for React-Native
Kobkrit Viriyayudhakorn
 
[React-Native Tutorial] Map
Kobkrit Viriyayudhakorn
 
Using React Native in a digital health solution
vincentlaulagnet
 
React Native + Redux, a game changer for mobile application development?
vincentlaulagnet
 
React Native Firebase Realtime Database + Authentication
Kobkrit Viriyayudhakorn
 
[React-Native Tutorial] Lecture 8: Midterm Exam Discussion, Feedback, and Ter...
Kobkrit Viriyayudhakorn
 
React-Native Lecture 11: In App Storage
Kobkrit Viriyayudhakorn
 
สร้างซอฟต์แวร์อย่างไรให้โดนใจผู้คน (How to make software that people love)
Kobkrit Viriyayudhakorn
 
React Native Firebase
Kobkrit Viriyayudhakorn
 
[React-Native Tutorial 10] Camera Roll / Gallery / Camera / Native Modules by...
Kobkrit Viriyayudhakorn
 
Startup Pitching and Mobile App Startup
Kobkrit Viriyayudhakorn
 
[React Native Tutorial] Lecture 5: Input and State
Kobkrit Viriyayudhakorn
 
[React Native Tutorial] Lecture 6: Component, Props, and Network
Kobkrit Viriyayudhakorn
 
[React Native Tutorial] Lecture 7: Navigation - Scene Transition - ListView
Kobkrit Viriyayudhakorn
 
Lecture 2: ES6 / ES2015 Slide
Kobkrit Viriyayudhakorn
 
Ad

Similar to [React Native Tutorial] Lecture 3: More on ES6/ES2015 (20)

PPTX
Es6 hackathon
Justin Alexander
 
PDF
ES6 - Next Generation Javascript
RameshNair6
 
PDF
JavaScript - new features in ECMAScript 6
Solution4Future
 
PPTX
MiamiJS - The Future of JavaScript
Caridy Patino
 
PPTX
ES6: Features + Rails
Santosh Wadghule
 
PPTX
Getting started with ES6 : Future of javascript
Mohd Saeed
 
PDF
ES6 Simplified
Carlos Ble
 
PDF
JavaScript Editions ES7, ES8 and ES9 vs V8
Rafael Casuso Romate
 
PPTX
ECMA5 and ES6 Promises
Oswald Campesato
 
PDF
2013-06-24 - Software Craftsmanship with JavaScript
Johannes Hoppe
 
PDF
2013-06-15 - Software Craftsmanship mit JavaScript
Johannes Hoppe
 
PDF
The Future of JVM Languages
VictorSzoltysek
 
PDF
Marrow: A Meta-Framework for Python 2.6+ and 3.1+
ConFoo
 
PDF
Game Design and Development Workshop Day 1
Troy Miles
 
PDF
React Native Evening
Troy Miles
 
PDF
The Ring programming language version 1.5 book - Part 5 of 31
Mahmoud Samir Fayed
 
PDF
Refactoring to Macros with Clojure
Dmitry Buzdin
 
PDF
ESCMAScript 6: Get Ready For The Future. Now
Krzysztof Szafranek
 
PDF
Groovy and Grails talk
desistartups
 
PPTX
ES6 is Nigh
Domenic Denicola
 
Es6 hackathon
Justin Alexander
 
ES6 - Next Generation Javascript
RameshNair6
 
JavaScript - new features in ECMAScript 6
Solution4Future
 
MiamiJS - The Future of JavaScript
Caridy Patino
 
ES6: Features + Rails
Santosh Wadghule
 
Getting started with ES6 : Future of javascript
Mohd Saeed
 
ES6 Simplified
Carlos Ble
 
JavaScript Editions ES7, ES8 and ES9 vs V8
Rafael Casuso Romate
 
ECMA5 and ES6 Promises
Oswald Campesato
 
2013-06-24 - Software Craftsmanship with JavaScript
Johannes Hoppe
 
2013-06-15 - Software Craftsmanship mit JavaScript
Johannes Hoppe
 
The Future of JVM Languages
VictorSzoltysek
 
Marrow: A Meta-Framework for Python 2.6+ and 3.1+
ConFoo
 
Game Design and Development Workshop Day 1
Troy Miles
 
React Native Evening
Troy Miles
 
The Ring programming language version 1.5 book - Part 5 of 31
Mahmoud Samir Fayed
 
Refactoring to Macros with Clojure
Dmitry Buzdin
 
ESCMAScript 6: Get Ready For The Future. Now
Krzysztof Szafranek
 
Groovy and Grails talk
desistartups
 
ES6 is Nigh
Domenic Denicola
 
Ad

More from Kobkrit Viriyayudhakorn (19)

PDF
Thai E-Voting System
Kobkrit Viriyayudhakorn
 
PPTX
Thai National ID Card OCR
Kobkrit Viriyayudhakorn
 
PPTX
Chochae Robot - Thai voice communication extension pack for Service Robot
Kobkrit Viriyayudhakorn
 
PDF
ศักยภาพของ AI สู่โอกาสใหม่แห่งการแข่งขันและความสำเร็จ (Thai AI updates in yea...
Kobkrit Viriyayudhakorn
 
PDF
Thai Text processing by Transfer Learning using Transformer (Bert)
Kobkrit Viriyayudhakorn
 
PDF
How Emoticon Affects Chatbot Users
Kobkrit Viriyayudhakorn
 
PPTX
หัวใจของปัญญาประดิษฐ์ (Gradient Descent ทำงานอย่างไร)
Kobkrit Viriyayudhakorn
 
PDF
Check Raka Chatbot Pitching Presentation
Kobkrit Viriyayudhakorn
 
PPTX
[Lecture 3] AI and Deep Learning: Logistic Regression (Coding)
Kobkrit Viriyayudhakorn
 
PPTX
[Lecture 4] AI and Deep Learning: Neural Network (Theory)
Kobkrit Viriyayudhakorn
 
PPTX
[Lecture 2] AI and Deep Learning: Logistic Regression (Theory)
Kobkrit Viriyayudhakorn
 
PDF
ITS488 Lecture 6: Music and Sound Effect & GVR Try out.
Kobkrit Viriyayudhakorn
 
PDF
Lecture 12: React-Native Firebase Authentication
Kobkrit Viriyayudhakorn
 
PDF
Unity Google VR Cardboard Deployment on iOS and Android
Kobkrit Viriyayudhakorn
 
PDF
ITS488 Lecture 4: Google VR Cardboard Game Development: Basket Ball Game #2
Kobkrit Viriyayudhakorn
 
PDF
Lecture 4: ITS488 Digital Content Creation with Unity - Game and VR Programming
Kobkrit Viriyayudhakorn
 
PDF
Lecture 2: C# Programming for VR application in Unity
Kobkrit Viriyayudhakorn
 
PDF
Lecture 1 Introduction to VR Programming
Kobkrit Viriyayudhakorn
 
PDF
Thai Word Embedding with Tensorflow
Kobkrit Viriyayudhakorn
 
Thai E-Voting System
Kobkrit Viriyayudhakorn
 
Thai National ID Card OCR
Kobkrit Viriyayudhakorn
 
Chochae Robot - Thai voice communication extension pack for Service Robot
Kobkrit Viriyayudhakorn
 
ศักยภาพของ AI สู่โอกาสใหม่แห่งการแข่งขันและความสำเร็จ (Thai AI updates in yea...
Kobkrit Viriyayudhakorn
 
Thai Text processing by Transfer Learning using Transformer (Bert)
Kobkrit Viriyayudhakorn
 
How Emoticon Affects Chatbot Users
Kobkrit Viriyayudhakorn
 
หัวใจของปัญญาประดิษฐ์ (Gradient Descent ทำงานอย่างไร)
Kobkrit Viriyayudhakorn
 
Check Raka Chatbot Pitching Presentation
Kobkrit Viriyayudhakorn
 
[Lecture 3] AI and Deep Learning: Logistic Regression (Coding)
Kobkrit Viriyayudhakorn
 
[Lecture 4] AI and Deep Learning: Neural Network (Theory)
Kobkrit Viriyayudhakorn
 
[Lecture 2] AI and Deep Learning: Logistic Regression (Theory)
Kobkrit Viriyayudhakorn
 
ITS488 Lecture 6: Music and Sound Effect & GVR Try out.
Kobkrit Viriyayudhakorn
 
Lecture 12: React-Native Firebase Authentication
Kobkrit Viriyayudhakorn
 
Unity Google VR Cardboard Deployment on iOS and Android
Kobkrit Viriyayudhakorn
 
ITS488 Lecture 4: Google VR Cardboard Game Development: Basket Ball Game #2
Kobkrit Viriyayudhakorn
 
Lecture 4: ITS488 Digital Content Creation with Unity - Game and VR Programming
Kobkrit Viriyayudhakorn
 
Lecture 2: C# Programming for VR application in Unity
Kobkrit Viriyayudhakorn
 
Lecture 1 Introduction to VR Programming
Kobkrit Viriyayudhakorn
 
Thai Word Embedding with Tensorflow
Kobkrit Viriyayudhakorn
 

Recently uploaded (20)

PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PDF
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PDF
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PDF
July Patch Tuesday
Ivanti
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PDF
IoT-Powered Industrial Transformation – Smart Manufacturing to Connected Heal...
Rejig Digital
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
July Patch Tuesday
Ivanti
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
IoT-Powered Industrial Transformation – Smart Manufacturing to Connected Heal...
Rejig Digital
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 

[React Native Tutorial] Lecture 3: More on ES6/ES2015