Important things to learn in javascript
Javascript is a event based Programming Language
Javascript Events:
Click
Double Click
Right Click
Mouse Hover
Mouse Out
Drag Drop
Key Press
Key Up
Load
Unload
Resize
Scroll
Q.: How may kinds of comment in Javascript
Ans: There are two comments in javascript
- Single line Comments //
- Multiple line comments */ /*
Q: How May types of Variable in Java Script
Ans: There are Tree types of variable in Javascript
- Var (With variable we can declare and assign or override the value multiple times.)
- Let (With let variable we can override the value but we can’t declare the the value again)
- Const (Once we declare the value we can’t declare again and can’t override)
Q: How Many types of Data Types in Javascript
Var x = “hello world”; —————————string
var x = 25; ——————————————-Number
var x = true/false; ——————————–Boolean
Var x = [“HTML”, “CSS”, “JS”];______Array
var x = {first:”jan”, last:”Feb”}; ————Object
var x = null; —————————————–null
var x: ———————————————–—undefined
Q: What is Arithmetic operators
+ | Addition |
– | Subtraction |
* | Multiplication |
** | Exponentiation |
/ | Division |
% | Modulus (Remainder) |
++ | Increment |
— | Decrement |
This Arithmetic operators work on numbers.
Q: Assignment Operators
Ans: Below are Assignment Operators
- -=
- +=
- *=
- /=
- %=
- **=
Q: Comparison Operators
OPERATOR | DESCRIPTION | |
== | Equal to | a==b |
=== | Equal value and equal type | Data type must be equal |
!= | Not Equal | |
!== | Not equal value or not equal type | |
> | greater than | |
< | Less than | |
>= | Greater than or equal to | |
<= | less than or equal to |
Q: What is ternary Operator
Ans:
Q: what is Switch Statement?
Ans:
Q: how many popup boxes in javascript
Ans: 1 alert 2. confirm 3. Prompt
Q What is javascript function and function with parameters write code?
Q: Local and Global Variable ?
Q: Javascript Events?
- click (onlick)
- double
Q: how may types of Loop in Javascript
Ans:
- while loop
- do/while loop
- for loop
- for/in loop (Objects)
- for Each (array)
Q: Learn Nested Loop ergent
Q: Array Methods
ans:
- sort()
- reverse()
- pop()
- push()
- shift()
- unshift()
- concat()
- join()
- slice()
- splice()
- isArray()
- indexOf()
- lastIndexOf()
- entries()
- every()
- filter()
- find()
- findIndex()
- includes()
- some()
- forEach()
- toString()
- valueOf()
- fill()
Q What is Objects
Q String Methods:
22 Methods
Q. Javascript Math Methods:
- ceil(x)
- floor(x)
- found(x)
- trunc(x)
- max(x,y,z…n)
- min(x, y, ….n)
- sqrt(x)
- cbrt(x)
- pow(x,y)
- random(x)
- abs(x)
- PI
Q: Date Methods
- toDateString()
- getDate()
- getFullYear()
- getMonth()
- getDay()
- getHour()
- getminuts()
- getSeconds()
- getMilliseconds()
- setDate()
- setFullYear()
- setHours()
- setMilliseconds()
- setMinutes
- setMonth()
- setSeconds()
Q: DOM (Document Object Module)
DOM Targeting Methods
- document
- document.all
- document.documentElement
- document.head
- document.title
- document.body
- document.images
- document.anchors
- document.links
- document.forms
- document.doctype
- document.URL
- document.baseURI
- document.domain