1).what will printed to the console when the following code snippet is executed?
conslose….(typof(typof(null))?
typeof(typeof(null))
"string"
2).write a recursive method that reverses agiven string e.g ("popeye") will return "pyepop".
3).suppose object A is the prototype of object B .write a code snippet to print to the console
All the property names of properties of B that where not "inherited" from A.
4).suppose you have a java script sources code string (e.g "var x=3;y=4") and you want
To execute it dynamically from you code.
a. what options do you have ?
b. what are the security risks ?
c. discuss which option is preferred ?
5).what will be the out come of the fool wing code snippet?
Var my var="my value"
(function (){
Console .log (myvar);
Var myvar='local value';
})();
6).what will be out come of the following code snippets
Function build list(list){
Var result=;
For (var i=0 ;i<list.length;i++)
{
Var item='item'+list;
Result .puse(function (){alert(item+' '+list)}));
}return result;
}
Function test list(){
Var fnlist=buildlist();
For(var i=0;i<fnlist.length;i++){
}
}test list();
7).Ajax & jsonp
a. what is the sercirty limitation of ajax?
b.how does jsonp solve it?
c.what still cannot be done with jsonp?
d.since jsonp is limited then ,what other solutions are there to that security limitation of AJAX?
JQUERY
.what is the difference between $(document).ready and window .onloade()?
9).what are the two uses of the .on() method ? what is the difference between them?
HTML
10).describe all the ideas that come across your mind as to how optimize a website/web application which loads slowly?
11). what apis which where add to the html version 5 are you familiar with and experience with ? for every such API write a sentence or two about it is intended for .
HTTP
12). regarding browsers cookies:
a. explain how cookies work (how they are conveyed)
b.decribe the following concepts.
• Session cookie
• Persisted cookie
• Secure cookie
• http only cookie
• 3rd part cookie
• Zombie cookie
What is the http hider?
CSS
13)what is the referrer HTTP header ?
14)a. what are media queries ?
b. do media queries relate to responsive web design?
15) suppose you have the following html page
<!doctyp html>
<html>
<head>
<title>my modal win doo <title>
<head>
<body>
<div>lern ip sum dolor is anet…</div>
<div class="my modal window"> this is my modal window </div>
<div class="my mask"/>
</body>
</html>
Notice that the modal widow stays vertically and horizontally centered even if the browser window is resized or scrolled .use opacity 60% for the mask.
A. You need to define the css classes (my modal window and my mask) for the outcome to be like the msck up
Nowing that the modal window is 600x300 pixcls.
16 suppose you have the following html page:
<!doctype html>
<html>
<head>
<title>my menu</title>
</head>
<body>
<ul class='my menu'>
<li><a href ="#" >lorem </a></li>
<li><a href ="#">ipsum</a>
<ul>
<li><a href="#">Amet</a></li>
<li><a href="#">consettctur</a></li>
</ul>
<li> <a href="#">Dolor</a>
<ul>
<li><a href="#" > hdipiscing</a></li>
<li> <herf="#">Edit</a></li>
</ul>
</ul>
</li>
<li><a herf="#">sit</a></li>
</ul>
</body>
</html>
A)define CSS to turn the list into horizontal menu.
Submenus souled be opened when the mouse is over their parent.
B)change the lists class into "my menu horizontal " assuming the class you defined in section 3.A still affect the list.
Define CSS to turn the list into a vertical menu.