SlideShare a Scribd company logo
1 of 28
Intro Slides Below
Directions for use:
Please make a copy of this before editing the doc.
1. Select the “File” drop down menu above
2. Go to “Make a copy”, select
3. Rename the file and save it to your Drive
4. Begin creating your presentation!
Web Dev Study Jam #2
Wahyu Setiawan
@whysetiawan17
github.com/whysetiawan
linkedin.com/in/whysetiawan
Basic JavaScript
Introduction
JavaScript is a powerful programming language that
can add interactivity to a website. It was invented by
Brendan Eich.
With more experience, you'll be able to create games,
animated 2D and 3D graphics, comprehensive
database-driven apps, and much more!
JavaScript
Prepare Your Weapon
• Download NodeJS https://nodejs.org/en/download/
• Your Lovely Text Editor (VSCode, WebStorm, Vim, Sublime Text, etc)
JavaScript
In Browser
javascript was only used in browsers to build interactive web pages some
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
</head>
<body>
<script src="script.js"></script>
</body>
</html>
JavaScript
In Node
JavaScript code out of a browser so we can pass our JavaScript code to node
for execution and this means with JavaScript we can build the backend for
our web and mobile applications
console.log(“hello world”)
// hello world
JavaScript
so in a nutshell JavaScript code can be run inside of a browser or out side a
browser using node
Variable
Programming language use a variable to store data
temporarily in a computer's memory so we store our
data somewhere and give that memory location and
name and with this name we can read the data at the
given location in the future
JavaScript
let winner = “Argentina is winner” // String Literal
let port = 3000 // Number Literal
let isDone = True // Number Literal
// Cannot be a reserved keyword
// Should be meaningful
// Cannot start with a number (1name)
// Cannot contain a space or hyphen (-)
JavaScript
Dynamic Typing
Static
(statically-typed)
Dynamic
(Dynamic-typed)
string name = ‘Jhon’
let name = ‘Jhon’
Object
object in JavaScript and other programming languages
is like an object in real life think of a person a person
has name age address and so on these are the
properties of a person you have the same concept in
JavaScript
JavaScript
let name = “Jorge Lorenzo”
let age = 40
let person = {
name : “Jorge Lorenzo”
age : 30
}
console.log(person.name)
// “Jorge Lorenzo”
Arrays
enables storing a collection of multiple items under a
single variable name, and has members for performing
common array operations.
JavaScript
let colors = [“Red”,“Blue”,“Orange”]
console.log(colors[0])
// “Red”
JavaScript
● JavaScript arrays are resizable and can contain a mix of different data
types
● JavaScript arrays are zero-indexed
Function
functions are one of the fundamental building blocks
in JavaScript a function is basically a set of statements
that performs a task or calculates a value
JavaScript
// Arrow function (Modern JS)
const greet = () => {
console.log("hello world")
}
greet()
// hello world
// function with parameter
const greetName = (name) => {
console.log("hello " + name)
}
greetName("Jorge")
// hello Jorge
// Old JS function
function greet(){
console.log("hello world")
}
greet()
// hello world
// function with parameter
function greetName(name){
console.log("hello " + name)
}
greetName("Jorge")
// hello Jorge
JavaScript
Types Functions
function greetName(name){
console.log("hello " + name)
}
greetName("Jorge")
// hello Jorge
function square(number) {
return number*number
}
console.log(square(2))
// 4
Document Object Model (DOM)
The Document Object Model (DOM) is the data
representation of the objects that comprise the
structure and content of a document on the web.
JavaScript
<html>
<head>
<script>
// run this function when the document is loaded
window.onload = () => {
// create a couple of elements in an otherwise empty HTML page
const heading = document.createElement("h1");
const headingText = document.createTextNode("Big Head!");
heading.appendChild(headingText);
document.body.appendChild(heading);
};
</script>
</head>
<body></body>
</html>
JSX
It is called JSX, and it is a syntax extension to JavaScript,
recommend using it with React to describe what the UI
should look like
JavaScript
const name = "Josh Perez";
const element = <h1>Hello, {name}</h1>;
Any Questions
Next Step you Can Learn
JavaScript
● Modern JavaScript (ES6)
● Node Js
● TypeScript
● Frontend Web Framework
● Backend Framework (JS)
● Mobile Development (React
Native)
Web Dev Study Jam #2
Wahyu Setiawan
@whysetiawan17
github.com/whysetiawan
linkedin.com/in/whysetiawan
Basic JavaScript
Let’s build Movie App
Movie App Feature :
● Show List Off Movie
● Show Detail Movie
Data can be from API(Tmdb) or static JSON
5 January 2023 (link nya menyusul)

More Related Content

Similar to Web Development Study Jam #2 _ Basic JavaScript.pptx

01 Introduction - JavaScript Development
01 Introduction - JavaScript Development01 Introduction - JavaScript Development
01 Introduction - JavaScript DevelopmentTommy Vercety
 
Designers Guide To jQuery
Designers Guide To jQueryDesigners Guide To jQuery
Designers Guide To jQuerySteve Krueger
 
AMD - Why, What and How
AMD - Why, What and HowAMD - Why, What and How
AMD - Why, What and HowMike Wilcox
 
Dojo: Beautiful Web Apps, Fast
Dojo: Beautiful Web Apps, FastDojo: Beautiful Web Apps, Fast
Dojo: Beautiful Web Apps, FastGabriel Hamilton
 
Jquery dojo slides
Jquery dojo slidesJquery dojo slides
Jquery dojo slideshelenmga
 
The Magic Revealed: Four Real-World Examples of Using the Client Object Model...
The Magic Revealed: Four Real-World Examples of Using the Client Object Model...The Magic Revealed: Four Real-World Examples of Using the Client Object Model...
The Magic Revealed: Four Real-World Examples of Using the Client Object Model...SPTechCon
 
JavaScript Growing Up
JavaScript Growing UpJavaScript Growing Up
JavaScript Growing UpDavid Padbury
 
Terrastore - A document database for developers
Terrastore - A document database for developersTerrastore - A document database for developers
Terrastore - A document database for developersSergio Bossa
 
Week 4 - jQuery + Ajax
Week 4 - jQuery + AjaxWeek 4 - jQuery + Ajax
Week 4 - jQuery + Ajaxbaygross
 
Jquery optimization-tips
Jquery optimization-tipsJquery optimization-tips
Jquery optimization-tipsanubavam-techkt
 
Develop High Performance Windows 8 Application with HTML5 and JavaScriptHigh ...
Develop High Performance Windows 8 Application with HTML5 and JavaScriptHigh ...Develop High Performance Windows 8 Application with HTML5 and JavaScriptHigh ...
Develop High Performance Windows 8 Application with HTML5 and JavaScriptHigh ...Doris Chen
 
JavaScript & Dom Manipulation
JavaScript & Dom ManipulationJavaScript & Dom Manipulation
JavaScript & Dom ManipulationMohammed Arif
 

Similar to Web Development Study Jam #2 _ Basic JavaScript.pptx (20)

01 Introduction - JavaScript Development
01 Introduction - JavaScript Development01 Introduction - JavaScript Development
01 Introduction - JavaScript Development
 
Js lw melbourne
Js lw melbourneJs lw melbourne
Js lw melbourne
 
Designers Guide To jQuery
Designers Guide To jQueryDesigners Guide To jQuery
Designers Guide To jQuery
 
jQuery
jQueryjQuery
jQuery
 
AMD - Why, What and How
AMD - Why, What and HowAMD - Why, What and How
AMD - Why, What and How
 
Dojo: Beautiful Web Apps, Fast
Dojo: Beautiful Web Apps, FastDojo: Beautiful Web Apps, Fast
Dojo: Beautiful Web Apps, Fast
 
Jquery dojo slides
Jquery dojo slidesJquery dojo slides
Jquery dojo slides
 
JavaScript ES6
JavaScript ES6JavaScript ES6
JavaScript ES6
 
JS basics
JS basicsJS basics
JS basics
 
The Magic Revealed: Four Real-World Examples of Using the Client Object Model...
The Magic Revealed: Four Real-World Examples of Using the Client Object Model...The Magic Revealed: Four Real-World Examples of Using the Client Object Model...
The Magic Revealed: Four Real-World Examples of Using the Client Object Model...
 
jQuery introduction
jQuery introductionjQuery introduction
jQuery introduction
 
Jquery fundamentals
Jquery fundamentalsJquery fundamentals
Jquery fundamentals
 
JavaScript Core
JavaScript CoreJavaScript Core
JavaScript Core
 
JavaScript Growing Up
JavaScript Growing UpJavaScript Growing Up
JavaScript Growing Up
 
Terrastore - A document database for developers
Terrastore - A document database for developersTerrastore - A document database for developers
Terrastore - A document database for developers
 
Week 4 - jQuery + Ajax
Week 4 - jQuery + AjaxWeek 4 - jQuery + Ajax
Week 4 - jQuery + Ajax
 
Jquery optimization-tips
Jquery optimization-tipsJquery optimization-tips
Jquery optimization-tips
 
Dex Technical Seminar (April 2011)
Dex Technical Seminar (April 2011)Dex Technical Seminar (April 2011)
Dex Technical Seminar (April 2011)
 
Develop High Performance Windows 8 Application with HTML5 and JavaScriptHigh ...
Develop High Performance Windows 8 Application with HTML5 and JavaScriptHigh ...Develop High Performance Windows 8 Application with HTML5 and JavaScriptHigh ...
Develop High Performance Windows 8 Application with HTML5 and JavaScriptHigh ...
 
JavaScript & Dom Manipulation
JavaScript & Dom ManipulationJavaScript & Dom Manipulation
JavaScript & Dom Manipulation
 

Recently uploaded

Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 

Recently uploaded (20)

Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 

Web Development Study Jam #2 _ Basic JavaScript.pptx

  • 1. Intro Slides Below Directions for use: Please make a copy of this before editing the doc. 1. Select the “File” drop down menu above 2. Go to “Make a copy”, select 3. Rename the file and save it to your Drive 4. Begin creating your presentation!
  • 2. Web Dev Study Jam #2 Wahyu Setiawan @whysetiawan17 github.com/whysetiawan linkedin.com/in/whysetiawan Basic JavaScript
  • 3. Introduction JavaScript is a powerful programming language that can add interactivity to a website. It was invented by Brendan Eich. With more experience, you'll be able to create games, animated 2D and 3D graphics, comprehensive database-driven apps, and much more! JavaScript
  • 4. Prepare Your Weapon • Download NodeJS https://nodejs.org/en/download/ • Your Lovely Text Editor (VSCode, WebStorm, Vim, Sublime Text, etc)
  • 5. JavaScript In Browser javascript was only used in browsers to build interactive web pages some
  • 6. <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Document</title> </head> <body> <script src="script.js"></script> </body> </html>
  • 7. JavaScript In Node JavaScript code out of a browser so we can pass our JavaScript code to node for execution and this means with JavaScript we can build the backend for our web and mobile applications
  • 9. JavaScript so in a nutshell JavaScript code can be run inside of a browser or out side a browser using node
  • 10. Variable Programming language use a variable to store data temporarily in a computer's memory so we store our data somewhere and give that memory location and name and with this name we can read the data at the given location in the future JavaScript
  • 11. let winner = “Argentina is winner” // String Literal let port = 3000 // Number Literal let isDone = True // Number Literal // Cannot be a reserved keyword // Should be meaningful // Cannot start with a number (1name) // Cannot contain a space or hyphen (-)
  • 13. Object object in JavaScript and other programming languages is like an object in real life think of a person a person has name age address and so on these are the properties of a person you have the same concept in JavaScript JavaScript
  • 14. let name = “Jorge Lorenzo” let age = 40 let person = { name : “Jorge Lorenzo” age : 30 } console.log(person.name) // “Jorge Lorenzo”
  • 15. Arrays enables storing a collection of multiple items under a single variable name, and has members for performing common array operations. JavaScript
  • 16. let colors = [“Red”,“Blue”,“Orange”] console.log(colors[0]) // “Red”
  • 17. JavaScript ● JavaScript arrays are resizable and can contain a mix of different data types ● JavaScript arrays are zero-indexed
  • 18. Function functions are one of the fundamental building blocks in JavaScript a function is basically a set of statements that performs a task or calculates a value JavaScript
  • 19. // Arrow function (Modern JS) const greet = () => { console.log("hello world") } greet() // hello world // function with parameter const greetName = (name) => { console.log("hello " + name) } greetName("Jorge") // hello Jorge // Old JS function function greet(){ console.log("hello world") } greet() // hello world // function with parameter function greetName(name){ console.log("hello " + name) } greetName("Jorge") // hello Jorge
  • 20. JavaScript Types Functions function greetName(name){ console.log("hello " + name) } greetName("Jorge") // hello Jorge function square(number) { return number*number } console.log(square(2)) // 4
  • 21. Document Object Model (DOM) The Document Object Model (DOM) is the data representation of the objects that comprise the structure and content of a document on the web. JavaScript
  • 22. <html> <head> <script> // run this function when the document is loaded window.onload = () => { // create a couple of elements in an otherwise empty HTML page const heading = document.createElement("h1"); const headingText = document.createTextNode("Big Head!"); heading.appendChild(headingText); document.body.appendChild(heading); }; </script> </head> <body></body> </html>
  • 23. JSX It is called JSX, and it is a syntax extension to JavaScript, recommend using it with React to describe what the UI should look like JavaScript
  • 24. const name = "Josh Perez"; const element = <h1>Hello, {name}</h1>;
  • 26. Next Step you Can Learn JavaScript ● Modern JavaScript (ES6) ● Node Js ● TypeScript ● Frontend Web Framework ● Backend Framework (JS) ● Mobile Development (React Native)
  • 27. Web Dev Study Jam #2 Wahyu Setiawan @whysetiawan17 github.com/whysetiawan linkedin.com/in/whysetiawan Basic JavaScript
  • 28. Let’s build Movie App Movie App Feature : ● Show List Off Movie ● Show Detail Movie Data can be from API(Tmdb) or static JSON 5 January 2023 (link nya menyusul)