This document provides an introduction to JavaScript, covering the basics of how the web works, a brief history of JavaScript, key JavaScript concepts like variables, data types, and functions. It discusses clients and servers, and how JavaScript fits into frontend web development. The document includes examples and challenges for readers to practice basic JavaScript concepts in their browser.
This document provides an introduction to JavaScript. It discusses the basics of how the web works with clients and servers, gives a brief history of JavaScript, and covers key JavaScript concepts like variables, data types, functions, and parameters. The format for the session is outlined, which includes reviewing these concepts, practicing with challenges, and discussing next steps for continuing to learn.
This document provides an introduction to JavaScript, covering key concepts like variables, data types, functions, and how the web works. It begins with introductions from the instructor and mentor. It then discusses programming fundamentals like defining problems, finding solutions, and implementing them in code. The document explains that JavaScript is used for both front-end and back-end development. It covers JavaScript variables, strings, numbers, Booleans, and basic functions. It provides examples and challenges for readers to practice the concepts. In the end, it discusses continuing education options through 1-on-1 mentorship.
This document provides an introduction to C++ programming including problem solving skills, software evolution, procedural and object oriented programming concepts, basic C++ programs, operators, header files, conditional statements, loops, functions, pointers, structures and arrays. It discusses topics such as analyzing problems, planning algorithms, coding solutions, evaluating results, procedural and object oriented paradigms, inheritance, polymorphism, flowcharts, basic syntax examples, and more. Various examples are provided to illustrate key concepts in C++.
- JavaScript is a client-side scripting language used to validate data and embed scripts in HTML documents using the <SCRIPT> tag. It was developed by Brendan Eich and is supported by most browsers.
- Functions, variables, operators, and control structures work similarly in JavaScript as in C++. Common data types include numbers, strings, and Booleans. Functions are defined using the function keyword.
- Built-in functions like alert(), prompt(), and document.write() are used for output. Events like onclick trigger JavaScript execution. Arrays and objects allow storing multiple values.
JavaScript is a lightweight, interpreted programming language that runs in web browsers. It was introduced in 1995 to enable dynamic interactivity on web pages. JavaScript is used to add interactive effects and validate forms on web pages. It is an object-based scripting language that is used to make web pages dynamic. Some key features of JavaScript include being event-driven, platform independent, enabling quick development, and being relatively easy to learn. JavaScript uses variables, operators, functions, and objects to manipulate web page elements and interact with users.
Client-side scripting is performed using JavaScript to generate code that runs in the browser without server processing. JavaScript is used to create dynamic and interactive web pages by adding functionality and behaviors. It is the most commonly used programming language for building websites. JavaScript allows client-side validation, user notifications, simple calculations and greater control of the web page interface.
This document provides an introduction and overview of JavaScript. It discusses that JavaScript is a client-side scripting language that can be inserted into HTML pages and run by web browsers to provide interactive and dynamic features. It covers JavaScript basics like data types, variables, operators, functions, and events. It also explains how to write JavaScript code directly in HTML pages or externally and shows examples of built-in functions and how to create user-defined functions.
This document provides an introduction to JavaScript, covering the basics of how the web works, a brief history of JavaScript, key JavaScript concepts like variables, data types, and functions. It discusses clients and servers, and how JavaScript fits into frontend web development. The document includes examples and challenges for readers to practice basic JavaScript concepts in their browser.
This document provides an introduction to JavaScript. It discusses the basics of how the web works with clients and servers, gives a brief history of JavaScript, and covers key JavaScript concepts like variables, data types, functions, and parameters. The format for the session is outlined, which includes reviewing these concepts, practicing with challenges, and discussing next steps for continuing to learn.
This document provides an introduction to JavaScript, covering key concepts like variables, data types, functions, and how the web works. It begins with introductions from the instructor and mentor. It then discusses programming fundamentals like defining problems, finding solutions, and implementing them in code. The document explains that JavaScript is used for both front-end and back-end development. It covers JavaScript variables, strings, numbers, Booleans, and basic functions. It provides examples and challenges for readers to practice the concepts. In the end, it discusses continuing education options through 1-on-1 mentorship.
This document provides an introduction to C++ programming including problem solving skills, software evolution, procedural and object oriented programming concepts, basic C++ programs, operators, header files, conditional statements, loops, functions, pointers, structures and arrays. It discusses topics such as analyzing problems, planning algorithms, coding solutions, evaluating results, procedural and object oriented paradigms, inheritance, polymorphism, flowcharts, basic syntax examples, and more. Various examples are provided to illustrate key concepts in C++.
- JavaScript is a client-side scripting language used to validate data and embed scripts in HTML documents using the <SCRIPT> tag. It was developed by Brendan Eich and is supported by most browsers.
- Functions, variables, operators, and control structures work similarly in JavaScript as in C++. Common data types include numbers, strings, and Booleans. Functions are defined using the function keyword.
- Built-in functions like alert(), prompt(), and document.write() are used for output. Events like onclick trigger JavaScript execution. Arrays and objects allow storing multiple values.
JavaScript is a lightweight, interpreted programming language that runs in web browsers. It was introduced in 1995 to enable dynamic interactivity on web pages. JavaScript is used to add interactive effects and validate forms on web pages. It is an object-based scripting language that is used to make web pages dynamic. Some key features of JavaScript include being event-driven, platform independent, enabling quick development, and being relatively easy to learn. JavaScript uses variables, operators, functions, and objects to manipulate web page elements and interact with users.
Client-side scripting is performed using JavaScript to generate code that runs in the browser without server processing. JavaScript is used to create dynamic and interactive web pages by adding functionality and behaviors. It is the most commonly used programming language for building websites. JavaScript allows client-side validation, user notifications, simple calculations and greater control of the web page interface.
This document provides an introduction and overview of JavaScript. It discusses that JavaScript is a client-side scripting language that can be inserted into HTML pages and run by web browsers to provide interactive and dynamic features. It covers JavaScript basics like data types, variables, operators, functions, and events. It also explains how to write JavaScript code directly in HTML pages or externally and shows examples of built-in functions and how to create user-defined functions.
This document provides an introduction to Javascript, covering key topics like how the web works, Javascript concepts like variables and functions, and an overview of the Thinkful web development program. It begins with introductions and discusses formatting for the night, then covers the basics of programming and Javascript, including a brief history of Javascript. Key Javascript concepts like variables, strings, numbers, booleans, and functions are explained. Challenges are provided to practice these concepts. The document concludes with information about the Thinkful program syllabus, mentors, job outcomes, and a special introductory offer.
The document discusses HTML5 semantic elements and how they can be used to structure web pages in a more transparent way compared to traditional <div> elements. It provides examples of common HTML5 semantic elements like <header>, <nav>, <article>, <section>, and <aside> that can be used instead of <div> for specific sections like navigation, headers, articles, etc. The document also briefly reviews common HTML4 elements like <html>, <head>, <title>, <body>, and heading elements to provide context before discussing the new HTML5 semantic elements.
This document provides an overview of Module 2 of a course on Internet and Web Technology. It covers topics related to JavaScript, including:
- Programming fundamentals of JavaScript like variables, functions, and statements
- Different types of operators in JavaScript like arithmetic, comparison, logical, and assignment operators
- Defining and calling functions
- Using built-in functions like alert(), confirm(), and prompt()
- Best practices for writing JavaScript code
JavaScript is an object-oriented scripting language used to make webpages interactive. It is lightweight and commonly used as part of web pages. JavaScript can be used to validate user input, provide immediate feedback, and increase interactivity. JavaScript code can output data by writing to HTML elements, using alerts, or writing to the browser console. Key JavaScript concepts include variables, functions, objects, and arrays for storing and manipulating different types of data.
This chapter discusses functions, data types, and operators in JavaScript. It covers defining and calling functions, variable scope, built-in and custom functions, primitive and non-primitive data types including strings, numbers, Booleans, and null/undefined. The chapter also explains arithmetic, assignment, comparison, logical, and special operators as well as operator precedence.
This document provides an overview of key JavaScript concepts covered in a course, including conditional statements, loops, events, error handling, debugging, best practices, and performance tips. The course covers basic syntax and usage of JavaScript features like variables, functions, objects, and arrays. It also discusses style guides, common mistakes, and browser support for ECMAScript standards.
Intro to JavaScript - Thinkful LA, June 2017Thinkful
This document provides an introduction to JavaScript for beginners. It covers basic JavaScript concepts like variables, data types, functions, and objects. It also explains how the web works at a high level with clients making requests to servers. The document is meant to give attendees an overview of key JavaScript concepts to practice during a workshop on getting started with JavaScript.
This document provides an introduction to JavaScript including:
1. JavaScript is a client-side scripting language that adds interactivity to HTML pages. It is embedded directly into HTML and allows dynamic updating of content.
2. The document covers JavaScript syntax, variables, data types, functions, objects, arrays, strings, dates and more. It provides examples of how to declare variables, write functions, create objects and arrays, and manipulate strings and dates.
3. Methods for output, variable scope, and built-in objects like String, Array, Math and Date are described. The DOM (Document Object Model) and form validation using JavaScript are also mentioned.
The document provides an overview of JavaScript and how to write JavaScript programs. It discusses:
1) The objectives of learning JavaScript including understanding syntax, creating embedded and external scripts, working with variables, functions, arrays, and loops.
2) The differences between client-side and server-side programs and how JavaScript solves problems with server-side scripts.
3) How to write JavaScript programs by placing code in HTML files or external files and using tags like <script> to embed or link scripts.
4) Core JavaScript concepts covered include variables, data types, operators, functions, and built-in objects like Date, Math and more.
Polyglot and Poly-paradigm Programming for Better Agilityelliando dias
This document discusses the benefits of polyglot and poly-paradigm programming approaches for building more agile applications. It describes how using multiple languages and programming paradigms can optimize both performance and developer productivity. Specifically, it suggests that statically-typed compiled languages be used for core application components while dynamically-typed scripting languages connect and customize these components. This approach allows optimizing areas that require speed/efficiency separately from those requiring flexibility. The document also advocates aspects and functional programming to address cross-cutting concerns and concurrency challenges that arise in modern applications.
This document provides an introduction to the Java programming language. It discusses the origins and development of C and C++ which influenced Java. Key features of Java include being object-oriented, robust, portable, distributed, interpreted and having a simple buzzword design. The document also covers Java data types, variables, arrays, and alternative declaration syntax. It notes that Java is strongly typed and does not support pointers for security reasons.
JavaScript is an interpreted scripting language that is used to make web pages interactive. It allows for client-side scripting which means scripts can be run directly in the browser. JavaScript supports object-oriented programming and event-driven programming. There are two types of scripting - client-side which runs on the browser and server-side which runs on the web server. Common JavaScript looping statements include for loops and while loops, and objects can be created to group data and functions together. The Document Object Model defines the logical structure of documents and allows JavaScript to access and update elements.
JavaScript was originally created as LiveScript in 1995 and renamed to JavaScript. It is an interpreted scripting language that can be added to HTML pages to provide dynamic interactivity. JavaScript code is executed by the browser's JavaScript engine and does not need to be compiled. It allows manipulating the structure, style, and content of HTML documents, validating form data, detecting browser capabilities, and much more.
MTA understanding java script and coding essentialsDhairya Joshi
This document provides an overview of JavaScript coding essentials and concepts for managing and maintaining JavaScript and updating the UI. It covers topics such as functions, variables, identifiers, libraries, methods, events, showing/hiding elements, and updating content. Functions are segments of code that execute when invoked, variables store data, and methods are functions associated with objects. Events trigger actions, like onclick handlers. The document also demonstrates how to create simple JavaScript applications and link JavaScript to HTML.
This document outlines the modules and content covered in a JavaScript and ExtJS training course. Module 1 covers the basics of JavaScript, including elements of a JavaScript program, statements, functions, objects, arrays, and events. Module 2 provides an introduction to ExtJS and its fundamental classes. Module 3 continues ExtJS coverage, focusing on components, data stores, templates, and classes. Module 4 covers internationalization, drag and drop, common components like grids and trees, and application best practices in ExtJS. The objectives are to learn how to write JavaScript code using basic elements and create windows/dialog boxes, use built-in objects, handle events, manipulate forms, and integrate JavaScript with Java.
Java is a computer programming language that is concurrent, class-based, object-oriented, and specifically designed to have as few implementation dependencies as possible.
During this session, we introduce some of the most basic and important data classes of MATLAB: the numeric array and the cell array. We will handle the change of a string into a number, in relation to user input. We will do a small introduction to the assert() function, which we can use to check if a program is working as intended. Further, we will have a quick look at basic control flow - for-loop.
The document provides an overview of logic constructs and programming styles in C programming. It discusses sequence, selection, and iteration constructs. Sequence constructs execute statements in order. Selection constructs like if-else statements allow a program to make decisions by choosing which statements to execute based on conditions. Iteration constructs like for loops allow repetitive execution of a block of code. The document uses examples and flowcharts to illustrate these core logic constructs in C programming.
This document provides an introduction and overview of JavaScript. It begins with definitions of JavaScript and why it is important to study. It then discusses what JavaScript can do, such as manipulate HTML, respond to events, and more. The document outlines where JavaScript code can be written, either internally or externally. It also covers JavaScript output, input, statements, syntax, comments, variables, data types, and arrays. The high-level topics covered provide a good initial overview of JavaScript for someone new to the language.
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...shadow0702a
This document serves as a comprehensive step-by-step guide on how to effectively use PyCharm for remote debugging of the Windows Subsystem for Linux (WSL) on a local Windows machine. It meticulously outlines several critical steps in the process, starting with the crucial task of enabling permissions, followed by the installation and configuration of WSL.
The guide then proceeds to explain how to set up the SSH service within the WSL environment, an integral part of the process. Alongside this, it also provides detailed instructions on how to modify the inbound rules of the Windows firewall to facilitate the process, ensuring that there are no connectivity issues that could potentially hinder the debugging process.
The document further emphasizes on the importance of checking the connection between the Windows and WSL environments, providing instructions on how to ensure that the connection is optimal and ready for remote debugging.
It also offers an in-depth guide on how to configure the WSL interpreter and files within the PyCharm environment. This is essential for ensuring that the debugging process is set up correctly and that the program can be run effectively within the WSL terminal.
Additionally, the document provides guidance on how to set up breakpoints for debugging, a fundamental aspect of the debugging process which allows the developer to stop the execution of their code at certain points and inspect their program at those stages.
Finally, the document concludes by providing a link to a reference blog. This blog offers additional information and guidance on configuring the remote Python interpreter in PyCharm, providing the reader with a well-rounded understanding of the process.
Contenu connexe
Similaire à Java Script web development - Engineering
This document provides an introduction to Javascript, covering key topics like how the web works, Javascript concepts like variables and functions, and an overview of the Thinkful web development program. It begins with introductions and discusses formatting for the night, then covers the basics of programming and Javascript, including a brief history of Javascript. Key Javascript concepts like variables, strings, numbers, booleans, and functions are explained. Challenges are provided to practice these concepts. The document concludes with information about the Thinkful program syllabus, mentors, job outcomes, and a special introductory offer.
The document discusses HTML5 semantic elements and how they can be used to structure web pages in a more transparent way compared to traditional <div> elements. It provides examples of common HTML5 semantic elements like <header>, <nav>, <article>, <section>, and <aside> that can be used instead of <div> for specific sections like navigation, headers, articles, etc. The document also briefly reviews common HTML4 elements like <html>, <head>, <title>, <body>, and heading elements to provide context before discussing the new HTML5 semantic elements.
This document provides an overview of Module 2 of a course on Internet and Web Technology. It covers topics related to JavaScript, including:
- Programming fundamentals of JavaScript like variables, functions, and statements
- Different types of operators in JavaScript like arithmetic, comparison, logical, and assignment operators
- Defining and calling functions
- Using built-in functions like alert(), confirm(), and prompt()
- Best practices for writing JavaScript code
JavaScript is an object-oriented scripting language used to make webpages interactive. It is lightweight and commonly used as part of web pages. JavaScript can be used to validate user input, provide immediate feedback, and increase interactivity. JavaScript code can output data by writing to HTML elements, using alerts, or writing to the browser console. Key JavaScript concepts include variables, functions, objects, and arrays for storing and manipulating different types of data.
This chapter discusses functions, data types, and operators in JavaScript. It covers defining and calling functions, variable scope, built-in and custom functions, primitive and non-primitive data types including strings, numbers, Booleans, and null/undefined. The chapter also explains arithmetic, assignment, comparison, logical, and special operators as well as operator precedence.
This document provides an overview of key JavaScript concepts covered in a course, including conditional statements, loops, events, error handling, debugging, best practices, and performance tips. The course covers basic syntax and usage of JavaScript features like variables, functions, objects, and arrays. It also discusses style guides, common mistakes, and browser support for ECMAScript standards.
Intro to JavaScript - Thinkful LA, June 2017Thinkful
This document provides an introduction to JavaScript for beginners. It covers basic JavaScript concepts like variables, data types, functions, and objects. It also explains how the web works at a high level with clients making requests to servers. The document is meant to give attendees an overview of key JavaScript concepts to practice during a workshop on getting started with JavaScript.
This document provides an introduction to JavaScript including:
1. JavaScript is a client-side scripting language that adds interactivity to HTML pages. It is embedded directly into HTML and allows dynamic updating of content.
2. The document covers JavaScript syntax, variables, data types, functions, objects, arrays, strings, dates and more. It provides examples of how to declare variables, write functions, create objects and arrays, and manipulate strings and dates.
3. Methods for output, variable scope, and built-in objects like String, Array, Math and Date are described. The DOM (Document Object Model) and form validation using JavaScript are also mentioned.
The document provides an overview of JavaScript and how to write JavaScript programs. It discusses:
1) The objectives of learning JavaScript including understanding syntax, creating embedded and external scripts, working with variables, functions, arrays, and loops.
2) The differences between client-side and server-side programs and how JavaScript solves problems with server-side scripts.
3) How to write JavaScript programs by placing code in HTML files or external files and using tags like <script> to embed or link scripts.
4) Core JavaScript concepts covered include variables, data types, operators, functions, and built-in objects like Date, Math and more.
Polyglot and Poly-paradigm Programming for Better Agilityelliando dias
This document discusses the benefits of polyglot and poly-paradigm programming approaches for building more agile applications. It describes how using multiple languages and programming paradigms can optimize both performance and developer productivity. Specifically, it suggests that statically-typed compiled languages be used for core application components while dynamically-typed scripting languages connect and customize these components. This approach allows optimizing areas that require speed/efficiency separately from those requiring flexibility. The document also advocates aspects and functional programming to address cross-cutting concerns and concurrency challenges that arise in modern applications.
This document provides an introduction to the Java programming language. It discusses the origins and development of C and C++ which influenced Java. Key features of Java include being object-oriented, robust, portable, distributed, interpreted and having a simple buzzword design. The document also covers Java data types, variables, arrays, and alternative declaration syntax. It notes that Java is strongly typed and does not support pointers for security reasons.
JavaScript is an interpreted scripting language that is used to make web pages interactive. It allows for client-side scripting which means scripts can be run directly in the browser. JavaScript supports object-oriented programming and event-driven programming. There are two types of scripting - client-side which runs on the browser and server-side which runs on the web server. Common JavaScript looping statements include for loops and while loops, and objects can be created to group data and functions together. The Document Object Model defines the logical structure of documents and allows JavaScript to access and update elements.
JavaScript was originally created as LiveScript in 1995 and renamed to JavaScript. It is an interpreted scripting language that can be added to HTML pages to provide dynamic interactivity. JavaScript code is executed by the browser's JavaScript engine and does not need to be compiled. It allows manipulating the structure, style, and content of HTML documents, validating form data, detecting browser capabilities, and much more.
MTA understanding java script and coding essentialsDhairya Joshi
This document provides an overview of JavaScript coding essentials and concepts for managing and maintaining JavaScript and updating the UI. It covers topics such as functions, variables, identifiers, libraries, methods, events, showing/hiding elements, and updating content. Functions are segments of code that execute when invoked, variables store data, and methods are functions associated with objects. Events trigger actions, like onclick handlers. The document also demonstrates how to create simple JavaScript applications and link JavaScript to HTML.
This document outlines the modules and content covered in a JavaScript and ExtJS training course. Module 1 covers the basics of JavaScript, including elements of a JavaScript program, statements, functions, objects, arrays, and events. Module 2 provides an introduction to ExtJS and its fundamental classes. Module 3 continues ExtJS coverage, focusing on components, data stores, templates, and classes. Module 4 covers internationalization, drag and drop, common components like grids and trees, and application best practices in ExtJS. The objectives are to learn how to write JavaScript code using basic elements and create windows/dialog boxes, use built-in objects, handle events, manipulate forms, and integrate JavaScript with Java.
Java is a computer programming language that is concurrent, class-based, object-oriented, and specifically designed to have as few implementation dependencies as possible.
During this session, we introduce some of the most basic and important data classes of MATLAB: the numeric array and the cell array. We will handle the change of a string into a number, in relation to user input. We will do a small introduction to the assert() function, which we can use to check if a program is working as intended. Further, we will have a quick look at basic control flow - for-loop.
The document provides an overview of logic constructs and programming styles in C programming. It discusses sequence, selection, and iteration constructs. Sequence constructs execute statements in order. Selection constructs like if-else statements allow a program to make decisions by choosing which statements to execute based on conditions. Iteration constructs like for loops allow repetitive execution of a block of code. The document uses examples and flowcharts to illustrate these core logic constructs in C programming.
This document provides an introduction and overview of JavaScript. It begins with definitions of JavaScript and why it is important to study. It then discusses what JavaScript can do, such as manipulate HTML, respond to events, and more. The document outlines where JavaScript code can be written, either internally or externally. It also covers JavaScript output, input, statements, syntax, comments, variables, data types, and arrays. The high-level topics covered provide a good initial overview of JavaScript for someone new to the language.
Similaire à Java Script web development - Engineering (20)
Use PyCharm for remote debugging of WSL on a Windo cf5c162d672e4e58b4dde5d797...shadow0702a
This document serves as a comprehensive step-by-step guide on how to effectively use PyCharm for remote debugging of the Windows Subsystem for Linux (WSL) on a local Windows machine. It meticulously outlines several critical steps in the process, starting with the crucial task of enabling permissions, followed by the installation and configuration of WSL.
The guide then proceeds to explain how to set up the SSH service within the WSL environment, an integral part of the process. Alongside this, it also provides detailed instructions on how to modify the inbound rules of the Windows firewall to facilitate the process, ensuring that there are no connectivity issues that could potentially hinder the debugging process.
The document further emphasizes on the importance of checking the connection between the Windows and WSL environments, providing instructions on how to ensure that the connection is optimal and ready for remote debugging.
It also offers an in-depth guide on how to configure the WSL interpreter and files within the PyCharm environment. This is essential for ensuring that the debugging process is set up correctly and that the program can be run effectively within the WSL terminal.
Additionally, the document provides guidance on how to set up breakpoints for debugging, a fundamental aspect of the debugging process which allows the developer to stop the execution of their code at certain points and inspect their program at those stages.
Finally, the document concludes by providing a link to a reference blog. This blog offers additional information and guidance on configuring the remote Python interpreter in PyCharm, providing the reader with a well-rounded understanding of the process.
Comparative analysis between traditional aquaponics and reconstructed aquapon...bijceesjournal
The aquaponic system of planting is a method that does not require soil usage. It is a method that only needs water, fish, lava rocks (a substitute for soil), and plants. Aquaponic systems are sustainable and environmentally friendly. Its use not only helps to plant in small spaces but also helps reduce artificial chemical use and minimizes excess water use, as aquaponics consumes 90% less water than soil-based gardening. The study applied a descriptive and experimental design to assess and compare conventional and reconstructed aquaponic methods for reproducing tomatoes. The researchers created an observation checklist to determine the significant factors of the study. The study aims to determine the significant difference between traditional aquaponics and reconstructed aquaponics systems propagating tomatoes in terms of height, weight, girth, and number of fruits. The reconstructed aquaponics system’s higher growth yield results in a much more nourished crop than the traditional aquaponics system. It is superior in its number of fruits, height, weight, and girth measurement. Moreover, the reconstructed aquaponics system is proven to eliminate all the hindrances present in the traditional aquaponics system, which are overcrowding of fish, algae growth, pest problems, contaminated water, and dead fish.
Introduction- e - waste – definition - sources of e-waste– hazardous substances in e-waste - effects of e-waste on environment and human health- need for e-waste management– e-waste handling rules - waste minimization techniques for managing e-waste – recycling of e-waste - disposal treatment methods of e- waste – mechanism of extraction of precious metal from leaching solution-global Scenario of E-waste – E-waste in India- case studies.
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECTjpsjournal1
The rivalry between prominent international actors for dominance over Central Asia's hydrocarbon
reserves and the ancient silk trade route, along with China's diplomatic endeavours in the area, has been
referred to as the "New Great Game." This research centres on the power struggle, considering
geopolitical, geostrategic, and geoeconomic variables. Topics including trade, political hegemony, oil
politics, and conventional and nontraditional security are all explored and explained by the researcher.
Using Mackinder's Heartland, Spykman Rimland, and Hegemonic Stability theories, examines China's role
in Central Asia. This study adheres to the empirical epistemological method and has taken care of
objectivity. This study analyze primary and secondary research documents critically to elaborate role of
china’s geo economic outreach in central Asian countries and its future prospect. China is thriving in trade,
pipeline politics, and winning states, according to this study, thanks to important instruments like the
Shanghai Cooperation Organisation and the Belt and Road Economic Initiative. According to this study,
China is seeing significant success in commerce, pipeline politics, and gaining influence on other
governments. This success may be attributed to the effective utilisation of key tools such as the Shanghai
Cooperation Organisation and the Belt and Road Economic Initiative.
3. 3
SCRIPTING LANAGUAGE
JAVASCRIPT BASICS
OPERATORS & CONTROL STRUCTURES
JAVASCRIPT FUNCTION
OBJECTS : Array , String , Math & Date
DOM - Document Object Model
JAVASCRIPT EVENTS
4. JAVASCRIPT BASICS
• SCRIPTING LANAGUAGE
Scripting Language are programming languages
used to write web based programs.
4
5. Need for Scripting Language
• Validating the input data given
• To add different menu styles, graphics displays
• We can create new variables without specifying
the type.
5
6. Need for Scripting Language
• Data type conversion takes place automatically
• We can write event driven programs
–Mouse event , keyboard event
6
7. Easily & Fast - Scripting Programs
• Java Script is one of the
scripting languages
7
9. What JavaScript Can do For us?
• used to insert dynamic text into the HTML
ex: Name, Address
• react to events (for example, load the page
only when the user click on a button)
9
10. What JavaScript Can do For us?
• Animated/dynamic drop-down menus
• Displaying clock, date, and time
• Get and set cookies, ask questions to the
visitor, show messages
10
22. Variables and Datatypes
Declaring variables
• Variable is a name given to memory location to
store data.
• The stored data changes during the execution of
the program.
22
25. Variables and Datatypes
There are eight basic data types in JavaScript.
Data Types Description Example
String represents textual data 'hello', "hello world!" etc
Number an integer or a floating-point number 3, 3.234, 3e-2 etc.
BigInt an integer with arbitrary precision
900719925124740999n ,
1n etc.
Boolean Any of two values: true or false true and false
undefined a data type whose variable is not initialized let a;
null denotes a null value let a = null;
Symbol
data type whose instances are unique and
immutable
let value = Symbol('hello');
Object key-value pairs of collection of data let student = { };
25
26. Variables and Datatypes
<html> <body> <h2>JavaScript Variables</h2>
<p id="demo"></p>
<script>
var price1 = 5;
var price2 = 6;
var total = price1 + price2;
document.getElementById("demo").innerHTML =
"The total is: " + total;
</script> </body> </html>
26
30. Life span of variable
• Life span of varibale means how long a varibale
retains a given value during the execution of the
program.
• Two types of variables
» Local variable
» Global variable
30
32. • In javascript there is no need to specify the
datatypes of the variables.
• The data types are decided automatically during
script execution.
Example
(i) var answer= 42
32
33. Example
(i) var answer= 42
• This assigns an integer data value to the variable answer.
(ii) var name = "Ramu"
• This assigns a string data to the variable name.
(iii) var b = 2.48
• This assigns a floating point data to the variable b.
33
34. Literals
• Literals are fixed values that does not ch-ange
during the script execution.
• The following types of literals are used in
javascript
34
35. Numbers It can be either integer or float
Boolean It can be true or false
String It is made up of character within double
quotes
Null It contains no value
Undefined A value not assigned to any variable
35
36. OPERATORS
• An operator is a symbol which represents an
operation that can be performed on data.
• There are six operators available in JavaScript
36
41. Control Structures
• Control Structures are used to transfer
JavaScript program control from one statement to
any other statement.
• The different control statements are
41
43. Conditional Statements
• This is where the flow of the execution in a
program is decided.
• Conditional Statements decide the next step based
of the result.
43
49. Different types of Conditional Statements :
• if (condition) {
//code block to be executed
if condition is satisfied
}
• if (condition)
{
// code to be executed of
condition is true
}
else {
// code to be executed of
condition is false
}
49
51. Different types of Conditional Statements :
switch (expression) {
case LABEL-1:
//code block to be executed
Break;
case LABEL-2:
//code block to be executed
Break;
….
case LABEL-N:
//code block to be executed
Break;
default:
//default code to be executed if none of the above case is executed
} 51
53. Different types of Iterative Statement
• while (condition) {
//code block to be
executed if condition is
satisfied
}
• while
{
//code block to be
executed when
condition is satisfied
} (condition)
53
65. JavaScript Function
• Suppose you need to create a program to
create a circle and color it.
• You can create two functions to solve this
problem:
1. a function to draw the circle
2. a function to color the circle
65
66. JavaScript Function
• Dividing a complex problem into smaller
chunks makes your program easy to
understand and reusable.
66
67. JavaScript Function
• JavaScript also has a huge number of inbuilt
functions.
• For example, Math.sqrt() is a function to
calculate the square root of a number.
67
73. Function Parameters - Example
// program to print the text
// declaring a function
function greet(name) {
console.log("Hello " + name + ":)");
}
// variable name can be different
let name = prompt("Enter a name: ");
// calling function
greet(name);
73
77. Function Return
• The return statement can be used to return the value
to a function call.
• The return statement denotes that the function has
ended. Any code after return is not executed.
77
80. Benefits of Using a Function
• Function makes the code reusable. It can declare it
once and use it multiple times.
• Function makes the program easier as each small task
is divided into a function.
• Function increases readability.
80
84. Math Objects
• The Math class allows one to access common
mathematic functions and common values quickly in
one place.
• This static class contains methods such as max(), min(),
pow(), sqrt(), and exp()
84
85. Math
• Trigonometric functions such as sin(), cos(), and
arctan().
• Many mathematical constants are defined such as PI,
E, SQRT2, and some others
85
86. Math Object
• Unlike other objects, the Math object
has no constructor.
• The Math object is static.
• All methods and properties can be used
without creating a Math object first.
86
87. Math Properties (Constants)
• The syntax for any Math property is : Math.property
• JavaScript provides 8 mathematical constants that can
be accessed as Math properties:
87
88. Math Properties (Constants)
• Math.E // returns Euler's number
• Math.PI // returns PI
• Math.SQRT2 // returns the square root of 2
• Math.SQRT1_2 // returns the square root of 1/2
• Math.LN2 // returns the natural logarithm of 2
• Math.LN10 // returns the natural logarithm of 10
• Math.LOG2E // returns base 2 logarithm of E
• Math.LOG10E // returns base 10 logarithm of E
88
89. Math Methods
• The syntax for Math any methods is :
Math.method.(number)
• Example :
Math.sqrt(4); // square root of 4 is 2.
Math.random(); // random number between 0 and 1
89
90. Math Methods - Number to Integer
• There are 4 common methods to round a number to
an integer:
90
Method Description
Math.round(x) Returns x rounded to its nearest integer
Math.ceil(x) Returns x rounded up to its nearest integer
Math.floor(x) Returns x rounded down to its nearest integer
Math.trunc(x) Returns the integer part of x (new in ES6)
91. Arrays
• An array is an object that can store multiple values at
once.
• For example,
const words = ['hello', 'world', 'welcome'];
91
96. Function in Arrays
Method Description
concat() joins two or more arrays and returns a result
indexOf() searches an element of an array and returns its position
find() returns the first value of an array element that passes a test
pop()
removes the last element of an array and returns the
removed element
shift()
removes the first element of an array and returns the
removed element
96
97. Function in Arrays
Method Description
sort() sorts the elements alphabetically in strings and in ascending order
slice() selects the part of an array and returns the new array
splice() removes or replaces existing elements and/or adds new elements
push()
aads a new element to the end of an array and returns the new
length of an array
unshift()
adds a new element to the beginning of an array and returns the
new length of an array
97
105. String
• JavaScript string is a primitive data type that is used
to work with texts.
For example,
const name = 'John';
105
106. Create JavaScript Strings
• Strings are created by surrounding them with quotes.
There are three ways you can use quotes.
•Single quotes: 'Hello'
•Double quotes: "Hello"
•Backticks: `Hello`
106
107. JavaScript String Objects
• create strings using the new keyword.
• For example,
const a = 'hello';
(OR)
const b = new String('hello');
107
109. String Methods
Method Description
charAt(index) returns the character at the specified index
concat() joins two or more strings
replace() replaces a string with another string
split() converts the string to an array of strings
substr(start,
length)
returns a part of a string
109
111. String Methods
Method Description
trim() removes whitespace from the strings
includes()
searches for a string and returns a
boolean value
search()
searches for a string and returns a
position of a match
111
113. Date Object
• The Date class is yet another helpful included object
you should be aware of.
• It allows you to quickly calculate the current date or
create date objects for particular dates.
• To display today’s date as a string, we would simply
create a new object and use the toString() method.
113
114. Date Object
• var d = new Date();
• // This outputs Today is Mon Nov 12 2012 15:40:19
GMT-0700
• alert ("Today is "+ d.toString());
114
115. DOM - Document Object Model
• JavaScript is almost always used to interact with the
HTML document in which it is contained.
• This is accomplished through a programming interface
(API) called the Document Object Model.
115
116. DOM - Document Object Model
• The DOM document object is the root JavaScript
object representing the entire HTML document.
• It contains some properties and methods that we will
use extensively in our development and is globally
accessible as document.
• // specify the doctype, for example html
var a = document.doctype.name;
116
118. DOM Nodes
• In the DOM, each element within the HTML document
is called a node.
• If the DOM is a tree, then each node is an individual
branch.
118
119. DOM Nodes
• There are:
element nodes,
text nodes, and
attribute nodes
• All nodes in the DOM share a common set of
properties and methods.
119
120. DOM - Document Object Model
Method Description
createAttribute() Creates an attribute node
createElement() Creates an element node
createTextNode() Create a text node
getElementById(id)
Returns the element node whose id attribute matches
the passed id parameter.
getElementsByTagName(name)
Returns a nodeList of elements whose tag name
matches the passed name parameter.
120
122. Element node Object
122
Property Description
className The current value for the class attribute of this HTML element.
id The current value for the id of this element.
innerHTML
• Represents all the things inside of the tags.
• This can be read or written to and is the primary way which we
update particular div's using JS.
style
The style attribute of an element. We can read and modify this
property.
tagName The tag name for the element.
123. Modifying a DOM element
123
• The document.write() method is used to create output
to the HTML page from JavaScript.
• The modern JavaScript programmer will want to write
to the HTML page, but in a particular location, not
always at the bottom.
124. Modifying a DOM element
124
• Using the DOM document and HTML DOM element
objects, we can do exactly that using the innerHTML
property.
125. Changing an element’s style
125
• We can add or remove any style using the style or
className property of the Element node.
• Its usage is shown below to change a node’s
background color and add a three-pixel border.
126. Changing an element’s style
126
• var commentTag = document.getElementById("specificTag");
• commentTag.style.backgroundColour = "#FFFF00";
• commentTag.style.borderWidth="3px";
127. JavaScript Events
127
• An event is an action that can be
detected by JavaScript.
• We say then that an event is triggered
and then it can be caught by
JavaScript functions, which then do
something in response.
129. Event Types
129
• There are several classes of event,
1. Mouse Events
2. Keyboard Events
3. Form Events
4. Frame Events
130. Mouse events
130
Event Description
onclick The mouse was clicked on an element
ondblclick The mouse was double clicked on an element
onmousedown The mouse was pressed down over an element
onmouseup The mouse was released over an element
onmouseover The mouse was moved (not clicked) over an element
onmouseout The mouse was moved off of an element
onmousemove The mouse was moved while over an element
136. Keyboard events
136
Event Description
Onkeydown The user is pressing a key (this happens first)
Onkeypress The user presses a key (this happens after onkeydown)
Onkeyup The user releases a key that was down (this happens last)
137. Keyboard events - Example
137
• The following example code, submit a form in both
cases, manually button click and Enter key press on
Keyboard.
138. Keyboard events - Example
138
• Get the element of the input field.
• Execute the keyup function with addEventListener when the user
releases a key on the keyboard.
• Check the number of the pressed key using JavaScript keyCode
property.
• If keyCode is 13, trigger button element with click() event.
141. Form Events
141
Event Description
onblur
A form element has lost focus (that is, control has moved to a
different element, perhaps due to a click or Tab key press.
onchange
Some <input>, <textarea> or <select> field had their value
change. This could mean the user typed something, or selected a
new choice.
onfocus
Complementing the onblur event, this is triggered when an
element gets focus (the user clicks in the field or tabs to it)
onreset
HTML forms have the ability to be reset. This event is triggered
when that happens.
onselect
When the users selects some text. This is often used to try and
prevent copy/paste.
onsubmit
When the form is submitted this event is triggered. We can do some
pre-validation when the user submits the form in JavaScript before
sending the data on to the server.
143. Frame Events
143
• Frame events are the events related to the browser frame that
contains your web page.
• The most important event is the onload event, which tells us an
object is loaded and therefore ready to work with.
144. Frame Events
144
Event Description
onabort An object was stopped from loading
onerror An object or image did not properly load
onload When a document or object has been loaded
onresize The document view was resized
onscroll The document view was scrolled
onunload The document has unloaded
151. MCQ’s QUESTIONS
151
QUESTION 2
HOTSPOT
You are planning to use the Math object in a JavaScript
application. You write the following code to evaluate various
Math functions:
152. MCQ’s QUESTIONS
152
What are the final values for the three variables? To answer,
select the appropriate values in the answer area.