Agenda
Introductions & Objectives
Data Types, Built-In Functions, & Methods
For Loops & the Accumulator Pattern
Q & A
Introductions
Objectives
Describe some of the different
data types in JavaScript
Describe & implement the accumulator pattern
Ask questions as they come to you!
LET'S HACK STUFF
repl.it
Go to repl.it and type in JavaScript
Copy the following into the box on the left
and then hit run (or Command + Enter)
console.log('Hello World!')Data Types
Programming languages rely upon a variety of data types to perform all kinds of computations
Today we'll cover the following:
- Numbers
- Strings
- Lists (JS calls them Arrays)
Built-In Functions & Methods
Functions are blocks of code that can be reused
Methods are functions that are associated
with an object
Numbers, Strings, and Arrays all have methods
that can be called on them
If that's too complicated,
functions/methods are magic! ✨
BREAK
For Loops
What if we have a list where
we don't know the length?
For Loops allow us to make multiple
iterations over a list
You'll find them in all kinds of languages,
including JavaScript
For Loops
for (var i = 0; i < 5; i++) {
console.log("x")
}
for keyword
starting value of i
i is less than 5
increasing the value of i by 1
do something.
Accumulator Pattern
Patterns give us more tools to solve
complex problems we come across
Learning a programming language is
like learning a speaking language
Any questions?

Crush the Take Home
By Valerie Kraucunas
Crush the Take Home
- 671