Michael Elliott
coding.
var foo = "Hello";
(function() {
var bar = " World";
console.log(foo + bar);
})();
console.log(foo + bar);
var x = 5;
(function () {
var x;
console.log(x);
x = 10;
console.log(x);
})();
function consoleFunction(ele){
var text = 'Successful ' + ele;
var useThis = function(){console.log(text);}
return useThis;
}
var testThis = consoleFunction('Test');
testThis();
new String("abc") = "abc"
new String("abc") == "abc"
new String("abc") === "abc"
new String("abc") ==== "abc"
$( "button#play-movie" ).on( "click", playMovie );
$( "button#play-movie" ).css( "background-color", "orange" );
$( "button#play-movie" ).show();
Write a statement that takes your name and returns it backwards. Example:
"Brody Carlson"
console result: "noslraC ydorB"
Return array as an unordered html list in alphabetical order.
var friends = ["Mike", "Stacy", "Andy", "Rick"];
Question:
Write a method that performs a function on each element in an array, and returns a new, processed array (double each number in array).
var numbers = [1, 4, 9];
var doubles = ???;
// doubles will be [2, 8, 18]. numbers is still [1, 4, 9]
Accept the following URL
http://www.overstock.com/#blue-shoes,/k,/results.html?index=61&sort=Relevance&count=60&landingPage=false&CID=8675309
Then return an object that looks like this:
{
index: 61,
sort: 'Relevance',
count: 60,
landingPage: false,
CID: 8675309
}
3 rows under 1000px.
3 columns above 1000px.
Add a button that will create a new (yellow) row/column
Click the logo and change the shipping banner to red. Click should not refresh the page.
Updates the Shipping Banner to say:
"Shipping is FREE for everyone!!!"
Goes to cart (www.overstock.com/cart)
What's wrong?
angular.module('ui.filters', []);
angular.module('ui.directives', []);
angular.module('ui', [
'ui.filters',
'ui.directives'
]).value('ui.config', {});
angular.module('ui.directives', []).directive('uiFoo',
function() {
return {
restrict: 'EAC',
require: '?ngModel',
link: function($scope, element, attrs, controller) {
var controllerOptions, options;
element.text('iamfoo');
}
};
}
);
angular.module('ui.directives', []).directive('uiBar',
function() {
return {
restrict: 'EAC',
require: '?ngModel',
link: function($scope, element, attrs, controller) {
var controllerOptions, options;
element.text('iambar');
}
};
}
);
angular.module('myApp', ['ui.directives']);
By Michael Elliott