Skip to content

Commit

Permalink
Shorten variable name in example
Browse files Browse the repository at this point in the history
  • Loading branch information
RoyalIcing committed Jul 11, 2024
1 parent 12fd1a5 commit e55c385
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions site/concepts/strings.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,15 @@ defmodule HelloWorldComponent do
use Orb
use SilverOrb.StringBuilder

defwp daytime?(hour_of_day: I32), I32 do
hour_of_day >= 6 &&& hour_of_day <= 19
defwp daytime?(hour: I32), I32 do
hour >= 6 &&& hour <= 19
end

defw render(hour_of_day: I32), StringBuilder do
defw render(hour: I32), StringBuilder do
StringBuilder.build! do
"<h1>"

if daytime?(hour_of_day) do
if daytime?(hour) do
"Hello 🌞 sunny world"
else
"Hello 🌛 moonlit world"
Expand Down

0 comments on commit e55c385

Please sign in to comment.