OOJS
How do I make an oojs?
What is a oojs? How do you make a oojs? This script and codes were developed by Sudipta Das on 21 January 2023, Saturday.
OOJS - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>OOJS</title>
</head>
<body> <script src="js/index.js"></script>
</body>
</html>
OOJS - Script Codes JS Codes
(function(){ //"use strict" var a=b=3;
// console.log(a)
}());
//console.log(b)
var myObj={ foo:'bar', func: function(){ var self=this; console.log(this.foo); console.log(self.foo); (function(){ console.log(this.foo); console.log(self.foo); }()) }
}
//myObj.func();
var arr1 = "john".split('');
var arr2 = arr1.reverse();
var arr3 = "jones".split('');
arr2.push(arr3);
//console.log("array 1: length=" + arr1.length + " last=" + arr1.slice(-1));
//console.log("array 2: length=" + arr2.length + " last=" + arr2.slice(-1));
for (var i = 0; i < 5; i++) { // console.log('helo'); // setTimeout(function() { console.log(i); }, i * 1000 );
}
for (var i = 0; i < 5; i++) { (function(x) { setTimeout(function() { // console.log(x); }, x * 1000 ); })(i);
}
var myoj={ _name:'hero', greet:function(){ return this._name }
}
var temp=myoj.greet;
//console.log(temp())
//console.log(myoj.greet())
var obj={ _fname:'john', _lname:'doe', fullname:function(){ return this._fname+' '+this._lname }
}
//console.log(obj.fullname.bind(obj));
//var anobj=obj.fullname.bind(obj);
//anobj();
//obj.fullname.call(obj);
//obj.fullname.apply(obj);
var ananobj=function(arg){ console.log(arg+' '+this.fullname());
}.bind(obj,'hi');
ananobj();
function x(arg,arg2){ console.log(arg+' '+arg2+' ' +this.fullname());
};
x.call(obj,'hello','howdy');
(function(arg,arg2){ console.log(arg+' '+arg2+' ' +this.fullname());
}.apply(obj,['hello','hola']));
//------------------
var obj1={ name:'john', hello:function(thing){ //for apply no argument console.log(this.name+' says hello '+thing); //for apply: arguments[] }
}
var obj2={ name:'doe' }
//obj1.hello.call(obj2,'world');
//var _temp=obj1.hello.bind(obj2);
//_temp('world');
obj1.hello.apply(obj2,['mars','world']);
Developer | Sudipta Das |
Username | sdas13 |
Uploaded | January 21, 2023 |
Rating | 3 |
Size | 1,952 Kb |
Views | 8,096 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Canvas | 2,710 Kb |
Sorting Algorithms | 2,142 Kb |
WheatherOnATap | 3,874 Kb |
Pomodoro Timer | 2,900 Kb |
Form Submission | 1,993 Kb |
IMDB api | 3,872 Kb |
Flipkart Affiliate | 1,903 Kb |
Wiki Viewer | 4,181 Kb |
Javascript DOM | 1,893 Kb |
JS and The DOM | 1,686 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
About Us | Francescaedits | 1,902 Kb |
CSS3 iPad | Vikvarg | 1,766 Kb |
CSS Tooltips | Darylldoyle | 2,599 Kb |
A Pen by Bryan Rojas | Bryanrojas | 1,873 Kb |
Button fills | Zubfatal | 5,205 Kb |
Process Accordion | Devilskitchen | 31,432 Kb |
Factorial | KeithleySLHS | 1,158 Kb |
A Pen by Taylor Vowell | Taylorvowell | 5,962 Kb |
Firefox Breakout Guide | Quincysoeliman | 2,576 Kb |
Wikipedia Viewer | Thalpha | 4,426 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!