-
Make two directories inside
~/buffy:scoobiesandvamps -
Make files in
scoobiesnamedbuffy.txt,giles.txtandangel.txt -
Copy
angel.txtinto thevampsdirectory -
Delete the
vampsdirectory and everything inside it
-
Assign the string "Jack" to a variable called
captain -
Using the
captainvariable, 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
ifstatement that console.logs "SOS!" if there are more souls than lifeRafts
-
Create an array named
weekendwith just 'Saturday' in it -
Add 'Sunday' to the end of the
weekendarray -
Add 'Friday' to the front to the front of the
weekendarray -
Access 'Saturday' in the array and assign to a variable named
day -
Remove 'Friday' from the array
-
Write an object literal named
brainhaving a property ofenergyLevelwith a value of10as a number -
Assign the property of
energyLevelto a variable namedenergy -
Add a
dreamproperty to thebrainobject that holds the string 'electric sheep' -
Add a
dayDreamproperty to thebrainobject that holds the object{ lunch: ['burger', 'beer'] } -
Add another element
puddingto the lunch array inside thebrainobject
-
Write a function to return the area of a rectangle (the product of its length and its width)
-
Invoke the function with
3and4as arguments and save it to a variable namedresult