-5
\$\begingroup\$

You will write a simple program that prints exactly 1 2 3 4 5 6 7 8 9 10 to STDOUT, Console, or your language's closest output method. No other visible output should be seen. Any other code executed must be back-end only.

This is , so the catch is that you must include the previous answer's source code in your code ("included code"), comments and all. I have started the first answer down below.

Included code must be an exact replica of the previous code, unchanged and whole. To keep this challenge fair, the included code must not be in a comment. No language may be used twice. You may use languages created after this contest, but it must not be made for this challenge specifically. Please do not use any libraries or frameworks made for this challenge specifically, either.

This is a , so most vote score wins! Please vote on creativeness of code inclusion, which means that if someone who puts included code in a string and throws it away should not score very high. To make sure everyone gets a chance, discourage answers that do not follow the rules. Also, if you give an answer, please do not downvote other answers if they do not deserve it.

Please use the following draft for your answer:

#Answer Number: (your number in the chain)
##Language: (programming language used, hyperlinked to official website of language or hyperlink to download compiler)

**Previous Answer:**
(prev answer language)
(link to prev answer)

code

Any additional info. Try it on web and an explanation are highly encouraged.

Bytes Added: (optional, just for my musings. how many bytes you added to previous person's code)
\$\endgroup\$
2
  • 1
    \$\begingroup\$ There's two problems with this challenge. 1) There's really no reason it should be a popularity contest. An objective goal would be better. And 2) There's nothing to make new answers harder. They could just go on and on \$\endgroup\$
    – DJMcMayhem
    Nov 25, 2016 at 15:44
  • 1
    \$\begingroup\$ Order answers by oldest for it to make sense: codegolf.stackexchange.com/questions/101121/… \$\endgroup\$
    – ʰᵈˑ
    Nov 25, 2016 at 15:50

4 Answers 4

2
\$\begingroup\$

Answer Number: 4

Language: CSS

Previous answer

body:before{content:"0 1 2 3 4 5 6 7 8 9 10";}TLðý?0i<?php echo implode(" ",range(1,10)); die;?>
var textToPrint = '';
for (var i = 1; i < 11; i++) {
  textToPrint += i;
  if (i != 10)
    textToPrint += " ";
}
console.log(textToPrint);

https://jsfiddle.net/3tLpp4r2/

\$\endgroup\$
0
\$\begingroup\$

Answer Number: 1

Language: Javascript

Previous Answer:

First Answer, NA

var textToPrint = '';
for (var i = 1; i < 11; i++) {
  textToPrint += i;
  if (i != 10)
    textToPrint += " ";
}
console.log(textToPrint);

Bytes Added: 139

\$\endgroup\$
1
  • \$\begingroup\$ Please note that I've added a Bash answer 5 minutes earlier, so that is not really a "First Answer" :) \$\endgroup\$
    – zeppelin
    Nov 25, 2016 at 15:36
-1
\$\begingroup\$

Answer Number: 2

Language: PHP

Previous answer: https://codegolf.stackexchange.com/a/101123/38505

<?php echo implode(" ",range(1,10)); die;?>
var textToPrint = '';
for (var i = 1; i < 11; i++) {
  textToPrint += i;
  if (i != 10)
    textToPrint += " ";
}
console.log(textToPrint);

https://eval.in/685567

I'm unsure if I'm doing this right for the tag .

Prints the desired output, then dies.

\$\endgroup\$
-1
\$\begingroup\$

Answer Number: 3

Language 05AB1E

Previous answer

TLðý?0i<?php echo implode(" ",range(1,10)); die;?>
var textToPrint = '';
for (var i = 1; i < 11; i++) {
  textToPrint += i;
  if (i != 10)
    textToPrint += " ";
}
console.log(textToPrint);

Try it online!

\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.