-
Make two directories inside
~/buffy
:scoobies
andvamps
-
Make files in
scoobies
namedbuffy.txt
,giles.txt
andangel.txt
-
Copy
angel.txt
into thevamps
directory -
Delete the
vamps
directory and everything inside it
-
Assign the string "Jack" to a variable called
captain
-
Using the
captain
variable, use string concatenation to form the string "Oh Jack, my Jack!", assigning it to a variable namedphrase
var souls = 3;
var lifeRafts = 2;
- Write an
if
statement that console.logs "SOS!" if there are more souls than lifeRafts
-
Create an array named
weekend
with just 'Saturday' in it -
Add 'Sunday' to the end of the
weekend
array -
Add 'Friday' to the front to the front of the
weekend
array -
Access 'Saturday' in the array and assign to a variable named
day
-
Remove 'Friday' from the array
-
Write an object literal named
brain
having a property ofenergyLevel
with a value of10
as a number -
Assign the property of
energyLevel
to a variable namedenergy
-
Add a
dream
property to thebrain
object that holds the string 'electric sheep' -
Add a
dayDream
property to thebrain
object that holds the object{ lunch: ['burger', 'beer'] }
-
Add another element
pudding
to the lunch array inside thebrain
object
-
Write a function to return the area of a rectangle (the product of its length and its width)
-
Invoke the function with
3
and4
as arguments and save it to a variable namedresult