Introduction to JavaScript
Agenda
Objectives
Data Types, Built-In Functions, & Methods
For Loops & the Accumulator Pattern
Q & A
Objectives
Describe some of the different
data types in JavaScript
Describe & implement the accumulator pattern
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
Together we'll cover the following:
- Numbers
- Strings
- Collections (i.e. Arrays, Objects)
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
JavaScript has some methods built-in and other functions we will need to write ourselves.
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
Accumulator Pattern
Patterns give us more tools to solve
complex problems we come across
Learning a programming language is
like learning a speaking language
In this language, we typically write outside-in
Objectives
Describe some of the different
data types in JavaScript
Describe & implement the accumulator pattern
Basic Training (Intro to JavaScript)
By Wes Reid
Basic Training (Intro to JavaScript)
- 570