Skip to content

Commit

Permalink
I added more programming languages to the source (#2161)
Browse files Browse the repository at this point in the history
Co-authored-by: João Henrique Vale <[email protected]>
  • Loading branch information
joao-henrique-rebase and joao-henrique-rebase authored Oct 16, 2020
1 parent 446bae7 commit 17a50f8
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions lib/locales/en/source.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,43 @@ en:
hello_world:
ruby: "puts 'Hello World!'"
javascript: "alert('Hello World!');"
c: "printf('Hello World!');"
php: "echo 'Hello World!';"
python: "print('Hello World!')"
java: "System.out.println('Hello World!');"
elixir: "IO.puts 'Hello World!'"
print:
ruby: "puts 'faker_string_to_print'"
javascript: "console.log('faker_string_to_print');"
c: "printf('faker_string_to_print');"
php: "echo 'faker_string_to_print';"
python: "print('faker_string_to_print')"
java: "System.out.println('faker_string_to_print');"
elixir: "IO.puts 'faker_string_to_print'"
print_1_to_10:
ruby: "
(1..10).each { |i| puts i }"
javascript: "
for (let i=0; i<10; i++) {
console.log(i);
}"
c: "
for(int i=0; i<10; i++)
{
printf('%d', i);
}"
php: "
for ($i=1; $i<10; $i++) {
echo $i;
}"
python: "
for i in range(10):
print(i)"
java: "
for (int i=0; i<10; i++) {
System.out.println(i);
}"
elixir: "
Enum.each(1..10, fn(x) ->
IO.puts x
end)"

0 comments on commit 17a50f8

Please sign in to comment.