1 JAVA Script
Data type (int, float, string,
boolean, char,)
E.g “Dave”
about:blank typteof” ” (to print entered
data type)
Used open codeing page on tochrome brouser typteof 42, typeof 4.2,
typeof true,
• Sitting->them->dark (to change back color)
• Console (to type codes)
Declaring variables (var, let, const, nothing) Node index.js (to excute js on terminal window)
In js, a variable can store any type of data
since js understand it. Int & number are
same. Infinity is treated as a number.
Ex. Identify data type of the f.f
A range that a single var/let can store
Ex. Convert “123Tap”, “ 123Tap”, “ 1 2 3”, “Tp123”, “ “
“academy”, into a number & Boolean.
Ex. Compare 5 and ‘5’.
Convert number & Boolean into string.
Boolean to number, string to Boolean
Number
String
Boolean
Ex. Convert “123Tap”, “ 123Tap”, “ 1 2 3”, “Tp123”, into a
number & boolean
Comparison operator Ex. If age is >18, you well come.
Ex. If cartTotal is >=12000 please show that he is qualified for free
shipping.
Ex. Show transaction successful and insufficient balance.
Ex. Make a program that show us the remaining balance after the
transaction is conducted.
If statement and switch
UserRole:
If-else in js Admin:Grant full access to the system
Athore: permit creation of content
Editor: allow editing of content
Subscriber: enable content viewing