JavaScript Full-Stack Development Course Session 01

11
JavaScript Full-Stack Development Course Teacher: Bassir Jafarzadeh More Information: http://www.tutorialera.com Session 1: Introduction to JavaScript

Transcript of JavaScript Full-Stack Development Course Session 01

Page 1: JavaScript Full-Stack Development Course Session 01

JavaScript Full-Stack Development Course Teacher: Bassir Jafarzadeh More Information: http://www.tutorialera.com Session 1: Introduction to JavaScript

Page 2: JavaScript Full-Stack Development Course Session 01

JavaScript History and Features

A Short History of JavaScript JavaScript features like functional programming, object-oriented

scripting language and etc. ECMA organization which defined JavaScript standards such as ES3,

ES5, and ES6. Many platforms that support JavaScript such as all modern browsers,

some databases, mobile OSes, server frameworks like node.js and etc.

Page 3: JavaScript Full-Stack Development Course Session 01

Preparing Development Environment Installing a code editor Creating an HTML file Writing hello world program Running the program in the browser

Page 4: JavaScript Full-Stack Development Course Session 01

The Basics of HTML

HTML Document Tags and Elements Popular Elements: heading, paragraph, inline elements HTML Hierarchy Element Attributes Link Element and its attributes Input and button Element

Page 5: JavaScript Full-Stack Development Course Session 01

Variables and Expressions

What are values Variables Expressions and Statements Type of variables: numbers, strings, Booleans, objects, functions, and

undefined values. Operators on variables

Page 6: JavaScript Full-Stack Development Course Session 01

Input and Output Functions

A piece of program wrapped in a value Show messages: alert Log results: console.log Get Input: prompt Confirm an action: confirm Functions side effects and returned values

Page 7: JavaScript Full-Stack Development Course Session 01

Exercise 1: Ideal Weight Calculator

Write a program that: Gets user weight, age, gender and height

Shows the ideal weight based on Robinson formula

Shows user distance to the ideal weight

Page 8: JavaScript Full-Stack Development Course Session 01

Control Program Flow

Simple Flow Conditional Flow

if

if else

Loop Flow for

while

Mixture Flow

Page 9: JavaScript Full-Stack Development Course Session 01

Exercise 2: Multiplication table

Write a program that: Gets 2 numbers n and m.

Create a multiplication table with n columns and m rows.

Each entry represents multiplication of columns and rows numbers.

Replace values on diameter to star symbol (*).

Page 10: JavaScript Full-Stack Development Course Session 01

Exercise 3: Grade Calculator

Write a program that: Iterate numbers from 0 to 100 and Show each number as grade based on this

formula: 0 to 65: F

66 to 70: C

71 to 80: B

81 to 100: A

Page 11: JavaScript Full-Stack Development Course Session 01

Conclusion

You know what JavaScript is and where it came from and why it is so popular.

Your computer is prepared to write JavaScript programs You can write simple programs like getting inputs, processing on them

and writing output in console or alert to browser You are ready to create intermediate programs with functions.