Put in order · Vibe coding with Claude Code course · Module 6: YouTube clone

Order in YouTubePlayer

Arrange the lines of the YouTubePlayer component from top to bottom:

Items to put in order

  • }
  • return <iframe title={title} allowFullScreen ... />;
  • if (isPlaying) {
  • const [isPlaying, setIsPlaying] = useState(false);
  • return <button onClick={() => setIsPlaying(true)}>▶</button>;

You can check the correct answer by solving this task in the CodeWorlds game.