ar for web using javascript coursera week 2 answers

How to script in PlayCanvas quiz

1. Select the best answer to complete the following statement. A Web AR application is divided into two code bases: The Engine and __________________.

  • Functions
  • Scripts
  • Control structures
  • Operators

2. Which of the following are examples of script attributes? Select all that apply.

  • Curve
  • Entity
  • JSON
  • Cast shadows

3. Events are a way of communicating between scripts: The system fires a signal that an event has occurred that triggers another event that is created to respond to the first event by initiating a specific reaction. Select the best answer.

  • True
  • False

4. Pc is the namespace for JavaScript. It gives you access to all the functions, types, properties and so on that were created and defined for your application. Select the best answer.

  • True
  • False

JavaScript in PlayCanvas quiz

5. Which of the following statements best describes how JavaScript is used in PlayCanvas? Select all that apply.

  • Adds custom behaviors to entities
  • Can be thought of as divided into two code bases
  • Mimics Java’s object model
  • Relies on a single code base

6. Conditionals, loops and jumps control the flow of the program. They are examples of which of the following? Select the best answer.

  • Constructors
  • Prototypes
  • Scope
  • Control structures

7. How can you access the API Reference directly from the PlayCanvas Code Editor? Select the best answer.

  • From Navigate
  • From Preferences
  • From Help
  • From File

8. The entity for the PlayCanvas engine that gives you access to all the JavaScript functions, types, properties that were created for PlayCanvas is pc. Select the best answer.

  • True
  • False

Shuffle Q/A 1

9. True or false: Events are recommended to communicate between scripts: The system fires a signal that an event has occurred that triggers another event that is created to respond to the first event by initiating a specific reaction. Select the best answer.

  • True
  • False

10. What allows you to only have to write code once and then adjust and modify values in the Editor UI instead of writing new code? Select the best answer.

  • Command palette
  • Trigger events
  • Script attributes
  • JavaScript events

Leave a Reply