<script>
const mindBendingMovies = [
{ id: 1, title: "Inception", director: "Christopher Nolan", year: 2010, themes: ["dream manipulation", "layered reality", "subconscious trauma"] },
{ id: 2, title: "Time Bandits", director: "Terry Gilliam", 12 months: 1981, themes: ["time travel", "chaos vs order", "childhood imagination"] },
{ id: 3, title: "Incredible Planet", director: "René Laloux", 12 months: 1973, themes: ["alien societies", "subjugation", "transcendence"] },
{ id: 4, title: "Bare Lunch", director: "David Cronenberg", 12 months: 1991, themes: ["hallucination", "addiction", "subversion of reality"] },
{ id: 5, title: "Waking Life", director: "Richard Linklater", 12 months: 2001, themes: ["lucid dreaming", "philosophy", "existentialism"] }
];
</script>
<model>
/* Kinds hidden for brevity */
</model>
<div class="container">
<h1>Bizarre Film Record</h1>
<ul class="movie-list">
{#every mindBendingMovies as film (film.id)}
<li class="movie-item">
<div class="movie-title">{film.title}</div>
<div class="movie-director">Directed by {film.director} ({film.12 months})</div>
<div class="movie-themes">
{#every film.themes as theme}
<span>{theme}</span>
{/every}
</div>
</li>
{/every}
</ul>
</div>
The very first thing to note concerning the web page is how minimalist it’s. The three sections—script, model, and markup—symbolize every important side of the UI. This web page will turn out to be a Svelte element, with these parts driving its habits.
Right here’s a take a look at the web page thus far:

Matthew Tyson
The one script we’d like proper now could be the definition of the mindBendingMovies
array. We loop over the array within the markup: {#every mindBendingMovies as film (film.id)}
. The related contents are displayed utilizing the uncovered iterator variable, film
.