Class was cancelled on 1/10 because of snow, rescheduled to 1/13.
[scheduled:: 2025-01-13]
Typescript Functions
Links and useful resources
Lesson-specific resource links
Concept summary and connections
- functions
- function scope
- call and return functions
- functions as black boxes
- input to output mapping
Examples
Open Zed and run a shared buffer to do all of these examples together.
- Write a function to return the first word in a string
- make that function return the first word and the rest of the string after it
- Write a function to turn a string into a list of words
- Write a function to count the words in a string
- Write a function to count the unique words in a string
- Write a function to find the longest word in a string
- Write a function to create a concordance of the words in a string
- Split text by non-alphabetic
- Use a map to keep track of words you've seen
- Use your functions to
Media resources
- Youtube search for "functions"
- Youtube search for "function scope"
- Youtube search for "call and return functions"
- Youtube search for "functions as black boxes"
- Youtube search for "input to output mapping"