OOJS

Developer
Size
1,952 Kb
Views
8,096

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 Previews

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']);
OOJS - Script Codes
OOJS - Script Codes
Home Page Home
Developer Sudipta Das
Username sdas13
Uploaded January 21, 2023
Rating 3
Size 1,952 Kb
Views 8,096
Do you need developer help for OOJS?

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!

Sudipta Das (sdas13) Script Codes
Create amazing Facebook ads with AI!

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!