> ## Documentation Index
> Fetch the complete documentation index at: https://docs.typebot.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How to create loops?

export const YoutubeVideo = ({id}) => <div style={{
  position: 'relative',
  paddingBottom: '64.63195691202873%',
  height: 0
}}>
    <iframe title="Youtube video" src={`https://www.youtube.com/embed/${id}`} allowFullScreen style={{
  position: 'absolute',
  top: 0,
  left: 0,
  width: '100%',
  height: '100%',
  borderRadius: '8px'
}}></iframe>
  </div>;

<YoutubeVideo id="cWII8JgTMPk" />

In this video, I demonstrate how to implement a dynamic loop to collect guest names for a restaurant reservation chatbot.

I walk through setting up the chatbot to request the number of guests, and then, using JavaScript, create a list based on this number.

I explain how to use the 'Shift' set variable value to iterate through this list, collecting and storing each guest's name.

Despite the lack of a specific loop block in the platform, I show how to create a loop-like behavior through custom code.

The video is timestamped, feel free to move forward and back 👌
