JavaScript_lesson1.pdf information technology

sengkimnan321 9 views 16 slides Mar 07, 2025
Slide 1
Slide 1 of 16
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16

About This Presentation

good


Slide Content

DIGITAL UNIVERSITY OF CAMBODIA
JAVASCRIPT
Faculty Of Digital Industry
Dariya Thorn

T
I
T
L
E
01
1.Introduction to JavaScript
2.Variables and Data Types
3.Syntax and Statements
4.Objects and Arrays
5.Document Object Model
6.Debugging and Error Handling
7.Modern JavaScript
8.Working with JSON
9.Modules and Functions
មេម ៀនទី

មេម ៀនទី១
Introduction
to JavaScript

Agenda
1.What JavaScript is and its history.
2.How to include JavaScript in HTML
3.Using the console to test and debug code.

JavaScriptis a programming language that developers use to
make interactive webpages.
History of JavaScript
• JavaScript was created by Brendan Eich at Netscape
Communications in just 10 days in May 1995.
• Initially, it was called Mocha, then renamed to LiveScript, and
finally JavaScript.

How to include JavaScript in HTML
There are three main ways to include JavaScript in an HTML
file:
1.Inline JavaScript
2.Internal JavaScript
3.External JavaScript

How to include JavaScript in HTML
1.Inline JavaScript

How to include JavaScript in HTML
1.Internal JavaScript

How to include JavaScript in HTML
1.External JavaScript
File HTML
File JavaScript

console is a powerful tool for debugging, View error messages and
testing JavaScript code.
Using Console:
In JavaScript always use console.log() to print information or
document that they want to console.
Using the console to test and debug code

Using the console to test and debug code
Testing Console warning or error
Out put

Using the console to test and debug code
Testing Console array object
Out put

Using the console to test and debug code
Testing Console assert
Out put

1.console.log
2.console.clear
3.console.error
4.console.warn
5.console.info
6.console.assert
7.console.count and countReset
8.console.group and groupEnd
9.console.table
10.console.time and timeEnd
11.console.trace
Using the console to test and debug code
Tags