GithubHelp home page GithubHelp logo

week_1_assessment's Introduction

SEI Week 1 Assessment

Bash (Terminal)

For EACH and EVERY question in this section, assume you are in the ~/buffy directory:

  1. Make two directories inside ~/buffy: scoobies and vamps:


  2. Create files in scoobies named buffy.txt and angel.txt:


  3. Copy angel.txt into the vamps directory:


  4. Delete the vamps directory and everything inside it:

JS Variables

  1. Assign the string "Ahab" to a variable named captain:

  2. Using the captain variable instead of the text "Ahab", use string concatenation to form the string "Oh Ahab, my Ahab!", assigning it to a variable named phrase:

JS Conditionals

var souls = 3;
var lifeRafts = 2;
  1. Assuming the above variables, write an if statement that console.logs "SOS!" if there are more souls than lifeRafts (no need to write a function, just the if statement please):

Data Structures - JS Arrays

  1. Create an array named weekend with just a string 'Saturday' in it:

  2. Add the string 'Sunday' to the end of the weekend array:

  3. Now add the string 'Friday' to the front of the weekend array:

  4. Using square bracket notation, access 'Saturday' in the weekend array and assign to a variable named day (Note: the array has three days in it as this point):

  5. Remove 'Friday' from the array:

  6. Loop through the weekend array and for each element in it, print "Woohoo! It's finally <day name>"

Data Structures - JS Objects

Don't forget to use a var or let when defining new variables...

  1. Write an object literal named brain having a property with a key of energyLevel and a numeric value of 10:

  2. Assign the value of the property energyLevel to a variable named energy:

  3. Add a dream property to the brain object that holds the string 'electric sheep':

JS Functions

  1. Write a function named computeArea that has two parameters, length & width, and returns the area of a rectangle (the product of length and width):



  2. Invoke the computeArea function with 3 and 4 as arguments and save the returned result to a variable named area:

  3. Write a function findMax that takes in 1 paramater, an array of numbers, and returns the highest number in that array.

week_1_assessment's People

Contributors

pmacaluso3 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.