You are on page 1of 20

Subject: internet programming (IP) (CSDLO5012)

SH-2022 Lecture 1

Module 6: React JS

Mrs. Priyanka Y Abhyankar


Assistant Professor
Computer Engineering Department,
SAKEC
REACT JS
Introduction to
JavaScript

3
What are their
roles?
HTML: Structure of the page
CSS: Styling
JavaScript: Business Logic

4
What can it do?
Programming Language for the Web.
1 Can update and change both HTML
and CSS.
Can calculate, manipulate and validate
data.
Internal or External Script

External Internal

<script <script> alert( 'Hello,


src="/path/to/script.js"> world!' );

</script> </script>

6
Data Types & Variables
“ Undefined: Not assigned value to
Null: No value assigned (preferred)
Boolean
String
Symbol: Immutable and Unique
Number
BigInt: -(2^53 - 1) to (2^53 – 1)
Object
7
Ways of declaring variables
▸ Var
▸ Used all throughout the program
▸ Let
▸ Used within the scope of where it is declared
▸ Const
▸ Constant e.g. const pi = 3.14

8
Things to note:
Functions and variable names are CASE-
SENSITIVE
Good practice to use Camel Case.
thisIsCamelCase

9
Basic Arithmetic

10
Increment and Decrement
Var++
Var--

11
Augmented Math Operators
+=
-=

12
Prompt, Alert, Confirm
Alert: Message box requiring to click OK
Prompt: To get input through msg box
Confirm: True false question through msg box
https://javascript.info/alert-prompt-confirm

13
Type Conversion
Most of the times it is done automatically
String conversion
Numeric Conversion

14
Comparisons
a<b, a>b
a<=b, a>=b
a==b, a!=b

15
Conditional Branching
The “if” statement
Conditional operator

16
Loops
The “if” statement
Conditional operator

17
THANKS!
Any questions?

18
Resources
https://javascript.info/
https://www.freecodecamp.org/news/full-javascript-course-for-
2 beginners/
Lecture Outcomes
Learnt Basics of JavaScript

You might also like