luc4leone
2/28/2014 - 9:50 AM

BLOC checkpoint 10 question 2

# url = web address
# text = the link
def link(url, text)
  "<a href=#{url}>#{text}</a>"
end

p link("http://dontpuzzle.me", "my web site")

# the Output is:
# "<a href=http://dontpuzzle.me>my web site</a>"
# not correct, because it should be: <a href="http://dontpuzzle.me">my web site</a>"
# I tried this:

def link(url, text)
  "<a href=\"#{url}\">#{text}</a>"
end

# but it doesn't work