Skip to content
KALANBLON
Show contents

Chapter 3 of 6 · 10 min

Quiz: a reliable, safe state

Store, reducer, rendering and code injection: let's check that your application always displays the truth, and nothing else. You need 70% correct answers.

Quiz

6 questions · pass mark: 70%

  1. 1.What is a pure reducer?

    One answer

  2. 2.Why does this reducer trigger no render?

    One answer

    function tasks(state, action) {
      state.list.push(action.task);
      return state;
    }
  3. 3.Complete to display a comment with no risk of injection.

    Complete the code

    const li = document.createElement("li");
    li.____ = comment;
  4. 4.Why must a user-supplied link be checked with new URL?

    One answer

  5. 5.Which protections reduce the risk or impact of an XSS attack? (several answers)

    Several answers possible

  6. 6.A text displays "Tom & Jerry". What is the most likely cause?

    One answer

Your progress is saved on this device. Create a free account to keep your progress on all your devices.