Use LEFT and RIGHT arrow keys to navigate between flashcards;
Use UP and DOWN arrow keys to flip the card;
H to show hint;
A reads text to speech;
34 Cards in this Set
- Front
- Back
How to fix a page when the columns are 75% and 25% and floated opposite sides but the side bar has still fallen? |
|
|
responsive design |
<source srcset="img" media="(max-width: 400px)" </picture> |
|
images replacement |
border: 0; clip: rect(0 0 0 0) height: 1px; margin: -1px; overflow: hidden padding: 0 position:absolute width: 1px |
|
What is the box model |
The CSS box model is fundamental to understanding layout and sizing and such. It's made up of:
|
|
What does a reset css file do? |
resets to a consisit baseline |
|
How to clear floats |
|
|
What is the difference between inline, inline-block and block |
|
|
what is SVG? |
it is an scalable vector graphic vecotr graphics dont loose image quality upon scaling |
|
non standard fonts |
use @font-face from google link it in |
|
[role=navigation] > ul a:not([href^=mailto]) {} |
selects all anchor links that are not email |
|
css selectos |
|
|
css pseudo selectors |
the describe the state selectors are in
|
|
what does this selctor mean A E |
Any E element that is a descendant of an A element (that is: a child, or a child of a child, etc.) |
|
A > E |
Any E element that is a child (i.e. direct descendant) of an A element |
|
E:first-child |
Any E element that is the first child of its parent |
|
B + E |
Any E element that is the next sibling of a B element (that is: the next child of the same parent) |
|
what does this code print var a = b = 5; |
5 because b is in the global scope unless 'user strict' |
|
native method |
you could create a string method by using string.prototype.methodName |
|
hoisting |
hoisted variables dont retain value just declared hoisted functions work |
|
this context |
see other notes |
|
What is === operator? |
=== is called as strict equality operator which returns true when the two operands are having the same value without any type conversion. |
|
Explain how can you submit a form using JavaScript? |
To submit a form using JavaScript use document.form[0].submit();document.form[0].submit(); |
|
How can the style/class of an element be changed? |
document.getElementById(“myText”).className = “anyclass”; |
|
How can you convert the string of any base to integer in JavaScript? |
The parseInt() function is used to convert numbers between different bases. parseInt() takes the string to be converted as its first parameter, and the second parameter is the base of the given string. |
|
Explain the difference between “==” and “===”? |
“==” checks only for equality in value whereas “===” is a stricter equality test and returns false if either the value or the type of the two variables are different. |
|
What would be the result of 3+2+”7″? |
Since 3 and 2 are integers, they will be added numerically. And since 7 is a string, its concatenation will be done. So the result would be 57. |
|
What do mean by NULL in Javascript? |
The NULL value is used to represent no value or no object. It implies no object or null string, no valid boolean value, no number and no array object. |
|
What is an undefined value in JavaScript? |
Undefined value means theVariable used in the code doesn’t existVariable is not assigned to any valueProperty doesn’t exist |
|
What are all the types of Pop up boxes available in JavaScript? |
AlertConfirm andPrompt |
|
What is the difference between .call() and .apply()? |
The function .call() and .apply() are very similar in their usage except a little difference. .call() is used when the number of the function’s arguments are known to the programmer, as they have to be mentioned as arguments in the call statement. On the other hand, .apply() is used when the number is not known. The function .apply() expects the argument to be an array. |
|
Define event bubbling? |
JavaScript allows DOM elements to be nested inside each other. In such a case, if the handler of the child is clicked, the handler of parent will also work as if it were clicked too. |
|
You can use the prototype pattern, adding each method and property directly on the object’s prototype. |
function Employee () {}Employee.prototype.firstName = "Abhijit"; Employee.prototype.lastName = "Patel"; Employee.prototype.startDate = new Date(); Employee.prototype.signedNDA = true; Employee.prototype.fullName = function () {console.log (this.firstName + " " + this.lastName); }; var abhijit = new Employee () //console.log(abhijit.fullName()); // Abhijit Patelconsole.log(abhijit.signedNDA); // true |
|
You can also use the constructor pattern, a constructor function (Classes in other languages, but Functions in JavaScript). |
function Employee (name, profession) {this.name = name;this.profession = profession; } // Employee () is the constructor function because we use the new keyword below to invoke it. var richard = new Employee (“Richard”, “Developer”) // richard is a new object we create from the Employee () constructor function. console.log(richard.name); //richardconsole.log(richard.profession); // Developer |
|
How do yousort a collection in backbone |
With Backbone.js, collections can be sorted by defining comparator on the collection object. By default, collections are not explicitly sorted. By defining a comparator, a collection is sorted whenever a model is added or the “sort()” method is invoked on a collection: var Fruits = Backbone.Collection.extend({ comparator: function(a, b) { /* .. */ }})// Orvar Fruits = Backbone.Collection.extend({})var fruits = new Fruits()fruits.comparator = function(a, b) { /* .. */ } |