mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-11-25 20:14:30 +03:00
[assemblyscript/en] fix link and format
This commit is contained in:
parent
f56f80dd80
commit
d66ea131e4
@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
language: Assemblyscript
|
language: AssemblyScript
|
||||||
contributors:
|
contributors:
|
||||||
- ["Philippe Vlérick", "https://github.com/pvlerick"]
|
- ["Philippe Vlérick", "https://github.com/pvlerick"]
|
||||||
- ["Steve Huguenin-Elie", "https://github.com/StEvUgnIn"]
|
- ["Steve Huguenin-Elie", "https://github.com/StEvUgnIn"]
|
||||||
@ -13,7 +13,7 @@ __AssemblyScript__ compiles a variant of __TypeScript__ (basically JavaScript wi
|
|||||||
This article will focus only on AssemblyScript extra syntax, as opposed to [TypeScript](/docs/typescript) and [JavaScript](/docs/javascript).
|
This article will focus only on AssemblyScript extra syntax, as opposed to [TypeScript](/docs/typescript) and [JavaScript](/docs/javascript).
|
||||||
|
|
||||||
To test AssemblyScript's compiler, head to the
|
To test AssemblyScript's compiler, head to the
|
||||||
[Playground](https://bit.ly/asplayground) where you will be able
|
[Playground](https://www.assemblyscript.org/editor.html#IyFydW50aW1lPXN0dWIKLyoqIENhbGN1bGF0ZXMgdGhlIG4tdGggRmlib25hY2NpIG51bWJlci4gKi8KZXhwb3J0IGZ1bmN0aW9uIGZpYihuOiBpMzIpOiBpMzIgewogIHZhciBhID0gMCwgYiA9IDEKICBpZiAobiA+IDApIHsKICAgIHdoaWxlICgtLW4pIHsKICAgICAgbGV0IHQgPSBhICsgYgogICAgICBhID0gYgogICAgICBiID0gdAogICAgfQogICAgcmV0dXJuIGIKICB9CiAgcmV0dXJuIGEKfQoKIyFodG1sCjx0ZXh0YXJlYSBpZD0ib3V0cHV0IiBzdHlsZT0iaGVpZ2h0OiAxMDAlOyB3aWR0aDogMTAwJSIgcmVhZG9ubHk+PC90ZXh0YXJlYT4KPHNjcmlwdD4KbG9hZGVyLmluc3RhbnRpYXRlKG1vZHVsZV93YXNtLCB7IC8qIGltcG9ydHMgKi8gfSkKICAudGhlbigoeyBleHBvcnRzIH0pID0+IHsKICAgIGNvbnN0IG91dHB1dCA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCdvdXRwdXQnKQogICAgZm9yIChsZXQgaSA9IDA7IGkgPD0gMTA7ICsraSkgewogICAgICBvdXRwdXQudmFsdWUgKz0gYGZpYigke2l9KSA9ICR7ZXhwb3J0cy5maWIoaSl9XG5gCiAgICB9CiAgfSkKPC9zY3JpcHQ+Cg==) where you will be able
|
||||||
to type code, have auto completion and directly see the emitted WebAssembly.
|
to type code, have auto completion and directly see the emitted WebAssembly.
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
@ -196,6 +196,7 @@ let bytes3: u8[] = [0, 1, 2, 3, 4] // will infer as Array<u8>
|
|||||||
```
|
```
|
||||||
|
|
||||||
## Further Reading
|
## Further Reading
|
||||||
|
|
||||||
* [AssemblyScript Official website](https://www.assemblyscript.org/)
|
* [AssemblyScript Official website](https://www.assemblyscript.org/)
|
||||||
* [AssemblyScript source documentation] https://github.com/AssemblyScript/website/tree/main/src)
|
* [AssemblyScript source documentation](https://github.com/AssemblyScript/website/tree/main/src)
|
||||||
* [Source Code on GitHub](https://github.com/AssemblyScript/assemblyscript)
|
* [Source Code on GitHub](https://github.com/AssemblyScript/assemblyscript)
|
||||||
|
Loading…
Reference in New Issue
Block a user