Skip to main content
added 80 characters in body
Source Link
PleaseStand
  • 5.6k
  • 2
  • 24
  • 44

JavaScript

Replace \t with a tab to get the posted character count.

Standard (6364 characters)

eval(eval("'<code here>'".replace(/\t */g,function(s){return"\\"+s.length})))

Version 1.8Arrow function (5549 characters)

eval(eval("'<code here>'".replace(/\t */g,function(s)"\\"+s=>"\\"+s.length)))

Encoder program for both

for(var i = 0, si = prompt("Enter the code."), so = ""; i < si.length; ++i) so += '\t' + Array(+si.charCodeAt(i).toString(8)).join(' '); prompt("Here is the result.", so);

JavaScript

Replace \t with a tab to get the posted character count.

Standard (63 characters)

eval(eval("'<code here>'".replace(/\t */g,function(s){return"\\"+s.length})))

Version 1.8 (55 characters)

eval(eval("'<code here>'".replace(/\t */g,function(s)"\\"+s.length)))

Encoder program for both

for(var i = 0, si = prompt("Enter the code."), so = ""; i < si.length; ++i) so += '\t' + Array(+si.charCodeAt(i).toString(8)).join(' '); prompt("Here is the result.", so);

JavaScript

Replace \t with a tab to get the posted character count.

Standard (64 characters)

eval(eval("'<code here>'".replace(/\t */g,function(s){return"\\"+s.length})))

Arrow function (49 characters)

eval(eval("'<code here>'".replace(/\t */g,(s)=>"\\"+s.length)))

Encoder program for both

for(var i = 0, si = prompt("Enter the code."), so = ""; i < si.length; ++i) so += '\t' + Array(+si.charCodeAt(i).toString(8)).join(' '); prompt("Here is the result.", so);
added 136 characters in body
Source Link
PleaseStand
  • 5.6k
  • 2
  • 24
  • 44

JavaScript (71 characters)

Replace \t with a tab to get the posted character count.

Standard (63 characters)

eval("<codeeval("'<code here>"here>'".replace(/\t */g,function(s){returnreturn"\\"+s.length})))

Version 1.8 (55 characters)

eval(eval("'<code Stringhere>'".fromCharCodereplace(/\t */g,function(s)"\\"+s.length)}))

Replace \t with a tab to get the posted character count.

Corresponding encoder program:

Encoder program for both

for(var i = 0, si = prompt("Enter code"the code."), so = ""; i < si.length; ++i) so += '\t' + Array(si+si.charCodeAt(i).toString(8)).join(' '); prompt("Here is the result"result.", so);

JavaScript (71 characters)

eval("<code here>".replace(/\t */g,function(s){return String.fromCharCode(s.length)}))

Replace \t with a tab to get the posted character count.

Corresponding encoder program:

for(var i = 0, si = prompt("Enter code"), so = ""; i < si.length; ++i) so += '\t' + Array(si.charCodeAt(i)).join(' '); prompt("Here is the result", so);

JavaScript

Replace \t with a tab to get the posted character count.

Standard (63 characters)

eval(eval("'<code here>'".replace(/\t */g,function(s){return"\\"+s.length})))

Version 1.8 (55 characters)

eval(eval("'<code here>'".replace(/\t */g,function(s)"\\"+s.length)))

Encoder program for both

for(var i = 0, si = prompt("Enter the code."), so = ""; i < si.length; ++i) so += '\t' + Array(+si.charCodeAt(i).toString(8)).join(' '); prompt("Here is the result.", so);
Source Link
PleaseStand
  • 5.6k
  • 2
  • 24
  • 44

JavaScript (71 characters)

eval("<code here>".replace(/\t */g,function(s){return String.fromCharCode(s.length)}))

Replace \t with a tab to get the posted character count.

Corresponding encoder program:

for(var i = 0, si = prompt("Enter code"), so = ""; i < si.length; ++i) so += '\t' + Array(si.charCodeAt(i)).join(' '); prompt("Here is the result", so);