-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathStrangeCodes.js
More file actions
17 lines (16 loc) · 842 Bytes
/
StrangeCodes.js
File metadata and controls
17 lines (16 loc) · 842 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// 1 - All codes in wtf.js :D
// -------------------------------------------------------------------------------------------
// 2 - This function which does many things, still returns output same as input. It works same as its name ;-)
// -------------------------------------------------------------------------------------------
// 3 - Incomplete
// func = function(){
// if (this[0] != this[this.length-1]) return;
// char = this[0];
// that = Array.prototype.slice.call(Array.from(this), // splits
// this.indexOf(char),
// this.lastIndexOf(char)+1)
// .join(''); // joins
// return that;
// }
// //Usage : func.call('aritra'); //Output 'aritra'
// -------------------------------------------------------------------------------------------