angularjs interview questions

Angularjs interview questions  

1. What is Dom?

 Dom means document object model is a representation of HTML web page in objects relationship model. Javascript manipulates HTML elements in the help of DOM methods.DOM can access Html elements ID ’s class, tag names to and modify and delete Html elements. It can set CSS properties values.

2. How methods we have to access DOM elements?

The three main DOM methods to access Html elements.

    1. get Element BY ID()
    2. get Element BY class()
    3. get Element BY TagName()

 

3. 2+4+”3”

63

4. What is the use of number?

Number function is used convert a value of character to number format in java script

5.print 2 4  6 8 10 12 ?

 

6.what is the function?

Function is a block of code which contains JavaScript statments with a specific name and optional arguments

Ex:

 

 

 

7. Difference between the while and Do-while and For

While

Do-While

For

This loop is used to execute the statement when a condition is true.

This loop is used to execute the statement when the while condition is true

This is used to execute the statement when the condition satisfies.

It enters only when the condition is satisfied.

Ex:var i=10;

While (i=<10)

{

Document.write(i+”
”);

I++;

}

Var i=11

{

do

Document.Write(i+”
”);

I++;

}

while(i<=10)

 

 

8.print Following

1

1 2

1 2 3

for(i=1;i<=3;i++)

{

For(n=1;n<=i;n++)

{

Document.write(n);

Document.write(“
”);

}

 

9.print odd numbers upto 20 using for and while loop?

for(i=1;i<=20;i++)

{

Document.write(i+”
”);

}

 

 

angularjs training in Hyderabad:-

Kosmik Technologies provides  AngularJs training in Hyderabad. we are providing real-time training and hands-on experience in all concepts.