KEMBAR78
Introduction to Web Development - JavaScript | PPTX
Introduction to Web Development
Session 3 - JavaScript
Ashwin Ganti
Core Team Member
Agenda
● Introduction to Javascript
● Variables and Constants
● Primitive Types
● Dynamic Typing and Objects
● Arrays
● Functions
● DOM
Introductionto Javascript
● What is Javascript?
● What can you do with Javascript?
● Where does this Javascript code run?
Variables
let nameClub = "GDSC";
Constants
● Variables declared with const keyword cannot be reassigned
● These Variables are restricted to block scope
● Eg:
const pi = 3.14;
Primitive Types
● String
● Number
● Boolean
● Undefined
● Null
Reference Types
● Objects
● Arrays
● Functions
Objects
● Objects are variables which can take many values in the form of
key-value pairs.
● How to Declare the object:
let details = {
name: "Rob",
age: 20
};
● How to Access the object:
console.log(details.age);
Arrays
● It is a Data Structure with a list of items
● Items can be of different data types
● Dynamic in Nature
Syntax:
const array_name = [item1, item2, ...];
Arrays
● How to Declare the arrays:
let favFood = ['Pizza', 'Pasta', 'Biriyani']
● How to Access Array Elements:
console.log(favFood[0])
Functions
● A Javascript function is a set of instructions performed under one
block
● It is Executed when something is invoked or called.
function square2Nos(number){
return number * number;
}
square2Nos(3)
Syntax:
function function_name(parameter1,
parameter2, parameter3) {
// code to be executed
}
DOM
● Document Object Model is a interface for dynamically accessing content,update the
structure and style of a document.
● It defines the properties of HTML and Methods to access these HTML elements.
● Eg:- Form Validation
Thank You!
Shoot your questions.

Introduction to Web Development - JavaScript

  • 1.
    Introduction to WebDevelopment Session 3 - JavaScript Ashwin Ganti Core Team Member
  • 2.
    Agenda ● Introduction toJavascript ● Variables and Constants ● Primitive Types ● Dynamic Typing and Objects ● Arrays ● Functions ● DOM
  • 3.
    Introductionto Javascript ● Whatis Javascript? ● What can you do with Javascript? ● Where does this Javascript code run?
  • 4.
  • 5.
    Constants ● Variables declaredwith const keyword cannot be reassigned ● These Variables are restricted to block scope ● Eg: const pi = 3.14;
  • 6.
    Primitive Types ● String ●Number ● Boolean ● Undefined ● Null
  • 7.
    Reference Types ● Objects ●Arrays ● Functions
  • 8.
    Objects ● Objects arevariables which can take many values in the form of key-value pairs. ● How to Declare the object: let details = { name: "Rob", age: 20 }; ● How to Access the object: console.log(details.age);
  • 9.
    Arrays ● It isa Data Structure with a list of items ● Items can be of different data types ● Dynamic in Nature Syntax: const array_name = [item1, item2, ...];
  • 10.
    Arrays ● How toDeclare the arrays: let favFood = ['Pizza', 'Pasta', 'Biriyani'] ● How to Access Array Elements: console.log(favFood[0])
  • 11.
    Functions ● A Javascriptfunction is a set of instructions performed under one block ● It is Executed when something is invoked or called. function square2Nos(number){ return number * number; } square2Nos(3) Syntax: function function_name(parameter1, parameter2, parameter3) { // code to be executed }
  • 12.
    DOM ● Document ObjectModel is a interface for dynamically accessing content,update the structure and style of a document. ● It defines the properties of HTML and Methods to access these HTML elements. ● Eg:- Form Validation
  • 13.