questions with answers

Front end developer Interview questions

UI(User-Interface) Developer or Front-end developers, we have only question list of around 40, all completely techinical question about html and css jquery and javascript we have written angularjs interview questions in the other section.

1) css selector precedence, pseudo classes
2) var a = {
  "a1"  :"123",
  "a 1": "helo",
  "b1"  : function(){
  
  var x = function() {
  console.log(a["a  1"]);   //how do you access a1 here
  console.log(a.a1);
  }
  x();
  console.log(this.a1);  //how do  you access a1 here
  console.log(a.a1);  //how do you  access a1 here
  }
  }
  a.b1();

3) What is closure and explain with example

4) What is prototype and how do you implement inheritance?

5) "namespace" in javascript

6) Difference between "on" and "live" jQuery and uses of on

7) Where to load scripts in html?

8) Different data types

9.Difference between undefined and null

10) Scopes in javascript

11) Falsy values

12) false == "false" //true or false?

13) Example of css float scenario

14) Function overloading on javascript? //no
       function  a(x,y,z){ return x+y+z;}
          a(1,2)//output?
       function  a(x,y){ return x+y;}
          a(1,2,3);//output?
15) var a = [1,2];
  a[100]  = 100;
a.length?

16) Object iteration?

17) How many event handlers will be attached when we use "on" on a set of matched elements?(same class elements)

18) Various types of object declaration?
  Ans:
  var x = new Object();
  var x = {};
var x = Object.Create();

19) About inline and block elements in html?

20.Difference between undefined and null

21.Different ways of object creation

22.Private variable accessing using getter

23.Writing prototype properties

24.If there exists same property in prototype and class which will come

25. Onclick first or href first when user clicks on anchor tag

26: display properties IN CSS

27 : Margin for span

28 : display : none and visiblity hidden difference

29 : div.class1{} #div{} body div.class1{} .class1{}

30 : closure and explanation with code

31 : function b(){
  alert(x);//undefined
}
function a(){
  var x  = 10;
  b();
}

32 : var x = { 'p1' : 'v1', 'p2' : function(){ console.log(this); (function(){ console.log(this); })(); } }

33 : inheritance and implementation

34 : can you create a complete web page from first to last ?

35 : where do you put stylesheet and how do you add it to html page?

36  : where do you put scripts and why?

37 : <html> <head> <script> console.log(document.getElementById('sample')): </script> </head> <body> <div id='sample'></div> </body> </html>

38 : difference between onload | ready | domcontentloaded and why do you write it

39 : different types of variables in javascript

40 : var x = {}; var y = {}; console.log(x == y);

41 : if(0 == '0') or if('0')

43 : difference between anchor tag href # and javascript: void(0)