You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: GettingStarted.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,16 +44,16 @@ The intent of this guide is to get you started with ElixirScript. It will give y
44
44
45
45
```bash
46
46
$ elixirscript ":atom" -ex
47
-
Kernel.SpecialForms.atom('atom')
47
+
Symbol.for('atom')
48
48
```
49
49
50
-
The elixirscript escript changed the elixir code, `:atom` into the JavaScript code `Kernel.SpecialForms.atom('atom')`. The `-ex` parameter lets the script know that the input is an Elixir code string instead of a file.
50
+
The elixirscript escript changed the elixir code, `:atom` into the JavaScript code `Symbol.for('atom')`. The `-ex` parameter lets the script know that the input is an Elixir code string instead of a file.
51
51
52
52
What if we wanted to give it a file? You would simply do the following:
53
53
54
54
```bash
55
55
$ elixirscript "example.exjs"
56
-
Kernel.SpecialForms.atom('atom')
56
+
Symbol.for('atom')
57
57
```
58
58
59
59
What you will have noticed by now is that it has output everything we've done so far to the terminal. What about if we want to place the output to a path? The next example takes a file as input and outputs the result in another directory.
0 commit comments