Skip to main content
deleted 68 characters in body
Source Link
chunes
  • 26.8k
  • 3
  • 24
  • 53

Lua, 8484 65 bytes

getmetatable''.__index=load"return'24day={length="24 hours'"hours"}os.
day = "Monday"
x = day.length
print(x)

Try it online!Try it online!

The first line simply overrides string indexing-19 thanks to return '24 hours'.Daniel Schepler

Lua, 84 bytes

getmetatable''.__index=load"return'24 hours'"
day = "Monday"
x = day.length
print(x)

Try it online!

The first line simply overrides string indexing to return '24 hours'.

Lua, 84 65 bytes

day={length="24 hours"}os.
day = "Monday"
x = day.length
print(x)

Try it online!

-19 thanks to Daniel Schepler

Source Link
chunes
  • 26.8k
  • 3
  • 24
  • 53

Lua, 84 bytes

getmetatable''.__index=load"return'24 hours'"
day = "Monday"
x = day.length
print(x)

Try it online!

The first line simply overrides string indexing to return '24 hours'.