D.10. Chapter 12

Chapter 12 has two exercises.

D.10.1. Exercise 1

In what two ways can you access a variable or call a function?

Solution

You can access a variable or call a function by using its zero-based index. You can also use the item’s name if one was specified for the item.

D.10.2. Exercise 2

Something you might have noticed is that the Tries value doesn’t reset when you replay the level or play the next level. Use the logging approach to locate the source of the issue.

Solution

In your WebAssembly\ folder, create an Appendix D\D.10.2\source\ folder, and then copy in the cards.wast file from your Chapter 12\source\ folder. Open the cards.wast file.

The first thing that you need to do is define an import s-expression for a logging ...

Get WebAssembly in Action now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.