Skip to main content
Commonmark migration
Source Link

##JavaScript (ES6), 65 bytes

JavaScript (ES6), 65 bytes

Latecomer to the game...

01?alert`Hello, World!` : a_l_e_r_t ` H e l l o ,   W o r l d ! `

Becomes:

0?lr`el,Wrd`:alert`Hello, World!`

Obviously, neither the a_l_e_r_t function nor the lr function does exist. That's OK, because their respective code paths are never executed.

###Demo

Demo

let code0 = "01?alert`Hello, World!` : a_l_e_r_t ` H e l l o ,   W o r l d ! `";
let code1 = code0.replace(/../g, s => s[0]);

console.log(code0);
eval(code0);
console.log(code1);
eval(code1);

##JavaScript (ES6), 65 bytes

Latecomer to the game...

01?alert`Hello, World!` : a_l_e_r_t ` H e l l o ,   W o r l d ! `

Becomes:

0?lr`el,Wrd`:alert`Hello, World!`

Obviously, neither the a_l_e_r_t function nor the lr function does exist. That's OK, because their respective code paths are never executed.

###Demo

let code0 = "01?alert`Hello, World!` : a_l_e_r_t ` H e l l o ,   W o r l d ! `";
let code1 = code0.replace(/../g, s => s[0]);

console.log(code0);
eval(code0);
console.log(code1);
eval(code1);

JavaScript (ES6), 65 bytes

Latecomer to the game...

01?alert`Hello, World!` : a_l_e_r_t ` H e l l o ,   W o r l d ! `

Becomes:

0?lr`el,Wrd`:alert`Hello, World!`

Obviously, neither the a_l_e_r_t function nor the lr function does exist. That's OK, because their respective code paths are never executed.

Demo

let code0 = "01?alert`Hello, World!` : a_l_e_r_t ` H e l l o ,   W o r l d ! `";
let code1 = code0.replace(/../g, s => s[0]);

console.log(code0);
eval(code0);
console.log(code1);
eval(code1);

typo
Source Link
Arnauld
  • 197.7k
  • 20
  • 179
  • 650

##JavaScript (ES6), 65 bytes

Latecomer to the game...

01?alert`Hello, World!` : a_l_e_r_t ` H e l l o ,   W o r l d ! `

Becomes:

0?lr`el,Wrd`:alert`Hello, World!`

Obviously, neither the a_l_e_r_t function nor the lr function does exist. That's OK, because their respective code pathpaths are never executed.

###Demo

let code0 = "01?alert`Hello, World!` : a_l_e_r_t ` H e l l o ,   W o r l d ! `";
let code1 = code0.replace(/../g, s => s[0]);

console.log(code0);
eval(code0);
console.log(code1);
eval(code1);

##JavaScript (ES6), 65 bytes

Latecomer to the game...

01?alert`Hello, World!` : a_l_e_r_t ` H e l l o ,   W o r l d ! `

Becomes:

0?lr`el,Wrd`:alert`Hello, World!`

Obviously, neither the a_l_e_r_t function nor the lr function does exist. That's OK, because their respective code path are never executed.

###Demo

let code0 = "01?alert`Hello, World!` : a_l_e_r_t ` H e l l o ,   W o r l d ! `";
let code1 = code0.replace(/../g, s => s[0]);

console.log(code0);
eval(code0);
console.log(code1);
eval(code1);

##JavaScript (ES6), 65 bytes

Latecomer to the game...

01?alert`Hello, World!` : a_l_e_r_t ` H e l l o ,   W o r l d ! `

Becomes:

0?lr`el,Wrd`:alert`Hello, World!`

Obviously, neither the a_l_e_r_t function nor the lr function does exist. That's OK, because their respective code paths are never executed.

###Demo

let code0 = "01?alert`Hello, World!` : a_l_e_r_t ` H e l l o ,   W o r l d ! `";
let code1 = code0.replace(/../g, s => s[0]);

console.log(code0);
eval(code0);
console.log(code1);
eval(code1);

added a note about the undeclared functions
Source Link
Arnauld
  • 197.7k
  • 20
  • 179
  • 650

##JavaScript (ES6), 65 bytes

Latecomer to the game...

01?alert`Hello, World!` : a_l_e_r_t ` H e l l o ,   W o r l d ! `

Becomes:

0?lr`el,Wrd`:alert`Hello, World!`

Obviously, neither the a_l_e_r_t function nor the lr function does exist. That's OK, because their respective code path are never executed.

###Demo

let code0 = "01?alert`Hello, World!` : a_l_e_r_t ` H e l l o ,   W o r l d ! `";
let code1 = code0.replace(/../g, s => s[0]);

console.log(code0);
eval(code0);
console.log(code1);
eval(code1);

##JavaScript (ES6), 65 bytes

Latecomer to the game...

01?alert`Hello, World!` : a_l_e_r_t ` H e l l o ,   W o r l d ! `

Becomes:

0?lr`el,Wrd`:alert`Hello, World!`

###Demo

let code0 = "01?alert`Hello, World!` : a_l_e_r_t ` H e l l o ,   W o r l d ! `";
let code1 = code0.replace(/../g, s => s[0]);

console.log(code0);
eval(code0);
console.log(code1);
eval(code1);

##JavaScript (ES6), 65 bytes

Latecomer to the game...

01?alert`Hello, World!` : a_l_e_r_t ` H e l l o ,   W o r l d ! `

Becomes:

0?lr`el,Wrd`:alert`Hello, World!`

Obviously, neither the a_l_e_r_t function nor the lr function does exist. That's OK, because their respective code path are never executed.

###Demo

let code0 = "01?alert`Hello, World!` : a_l_e_r_t ` H e l l o ,   W o r l d ! `";
let code1 = code0.replace(/../g, s => s[0]);

console.log(code0);
eval(code0);
console.log(code1);
eval(code1);

Source Link
Arnauld
  • 197.7k
  • 20
  • 179
  • 650
Loading