Skip to content

Conversation

@xllx1
Copy link
Contributor

@xllx1 xllx1 commented Apr 22, 2020

No description provided.

@@ -0,0 +1,2 @@
parse_and_run('function a(){const b = 2; return b;} a();');
// 2 No newline at end of file
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The last line of any text file should be terminated with a newline, by convention. So github gives you this warning:

Screenshot 2020-04-23 at 10 08 48 AM

The newline should not make any difference in the testing, hopefully.

' : factorial(n - 1) * n;\n' +
'}' +
'factorial(4);');
// 24 No newline at end of file
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

' a = 2;\n' +
'}\n' +
'x();');
// 1 No newline at end of file
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

return result;
}
print_one_line_list(result);
// 'baker1,cooper4,fletcher2,miller3,smith5,' No newline at end of file
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

return 5;\
}\
foo();");
// 5 No newline at end of file
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

@xllx1 xllx1 marked this pull request as ready for review April 23, 2020 06:50
@martin-henz martin-henz merged commit 5509075 into source-academy:master Apr 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants