Difference between revisions of "Junk"
From Wiki2
(Created page with " //Problem 1 //var highValue = 200; //var constanVal=2; // var myObj = { // highValue: 20, // constantVal: 5, // calculateIt: function (){ // setTimeout (functi...") |
|||
| Line 1: | Line 1: | ||
ko.applyBindings(vm2); | |||
var highValue = 200; | |||
var constanVal=2; | |||
var myObj = { | |||
highValue: 20, | |||
constantVal: 5, | |||
calculateIt: function (){ | |||
setTimeout (function (){ | |||
console.log(this.constantVal * this.highValue); | |||
}, 2000); | |||
} | |||
} | |||
myObj.calculateIt()// | |||
//Problem 1 | //Problem 1 | ||
Latest revision as of 13:24, 15 October 2015
ko.applyBindings(vm2);
var highValue = 200; var constanVal=2;
var myObj = {
highValue: 20,
constantVal: 5,
calculateIt: function (){
setTimeout (function (){
console.log(this.constantVal * this.highValue);
}, 2000);
}
}
myObj.calculateIt()//
//Problem 1 //var highValue = 200; //var constanVal=2; // var myObj = { // highValue: 20, // constantVal: 5, // calculateIt: function (){ // setTimeout (function (){ // console.log(this.constantVal * this.highValue); // }, 2000); // } // } // myObj.calculateIt()//
// Problem 2 // var name = "Michael Jackson"; // // function showCelebrityName () { // console.log (name); // } // // function showOrdinaryPersonName () { // name = "Johnny Evers"; // console.log (name); // }
// showCelebrityName ();
// showOrdinaryPersonName (); // // showCelebrityName ();