Module 4

Strings, Keywords, and Booleans

Strings

"Hello world"
"This is a longer string that I wrote for purposes of an example."
"Aubrey said, \"I think we should go to the Orange Julius.\""

Booleans and nil

Answers to questions

true
false
nil

Keywords

Keywords don't have a real world analog like numbers or strings

Think of keywords as a special kind of string, one used for labels.

:name
:input

Exercise: Store the name of your hometown

Write the name of your hometown as a string and then assign that string to the name my-hometown.

Exercise: make a function to format names

The str function can take any number of arguments, and it concatenates them together to make a string.

Write a function called format-name that takes two arguments, first-name and last-name. This function should output the name like so: Last, First.