About 2 hours
JavaScript is used on the frontend of almost every website. It’s also a widely-used scripting language that be used on the backend as well. The JavaScript lessons set a solid foundation in JavaScript basics so we can use the language in more robust ways in later lessons.
The data structures and syntax introduced in this course are fundamental for creating applications at all scales. They are tools that are used in any technology company and are often part of assignments for technical phone screens or on-site interviews. They ask questions about these concepts in interviews at Lumosity, Google, and Facebook, to name a few.
Participants will be able to:
.push()
, .pop()
, .shift()
and .unshift()
JavaScript Arrays
General JavaScript
JavaScript II - Arrays, Functions (video walkthrough of slides 1)
JavaScript II - Arrays, Functions (video walkthrough of slides 2)
JavaScript II - Arrays, Functions (slides)
JavaScript II - Arrays, Functions (difference between var/const/let and scopes explained video)
JavaScript II - Arrays, Functions (difference between var/const/let additional reading)
Use commas in your array to separate each data point. You’ll get a syntax error if you don’t.
Parameters are placeholders (p and p!). Arguments are actual values (a and a!). Parameters serve as placeholders in the function definition. Arguments are actual values you want the function to process once you call it.
Techtonica staff will assign pair partners.
printCuteAnimals
that expects an array to be passed in as an argument. You can name the function parameter whatever you like. When you pass the array to the function, it should contain strings, and the strings should be types of animals you think are cute.Your function should:
.pop()
method on it.Using MDN’s JavaScript documentation, identify 1 - 3 array methods (look on the left column) that you can incorporate into your function, and see if you can.
Find a partner and answer these questions:
let dessertArray = [ ["Pie", 4], ["Cupcake”, 5], ["Cookie", 12] ];