GithubHelp home page GithubHelp logo

christinemoses / js-basics-1-assessment Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ga-wdi-boston/js-diagnostic

0.0 2.0 0.0 80 KB

JavaScript Basics 1 Assessment

License: MIT License

JavaScript 100.00%

js-basics-1-assessment's Introduction

General Assembly Logo

Assessment for JavaScript Fundamentals

You have 30 minutes

Instructions

Fork, clone, branch (response), and npm install.

Follow the prompts below and complete each question. You may use any resource, other than someone else in the classroom, to help you complete this assessment.

You should save your answers in this README.md file, except for your answer to question 5 which should be saved in the file assessment.js.

Question 1

Please list the JavaScript primitives and give one example of each.

Question 2

var c = 5;
var d = 2;
c = c + d;

After this code executes, what is the value of c? Please identify the operators in the last line of this program c = c + d; and explain what they do.

Question 3

var x = 4;
var y = 3;
x = y;
y = 10;

After each line of code executes, what are the values of x and y? Do the variables change? Do their values?

Question 4

var weather;
weather = "sunny";
weather === "sunny";

What are the values of these expressions? Explain your answers.

Question 5

//We'll learn about require later in the course
var ask = require('./ask.js');

var answer = 'not empty';

while (answer !== '' && answer !== 'SeCrEt') {
  answer = ask("Guess my secret? ");
}

Change the code from this question so that it tests for a number betwen 1 and 10 instead of a string. Save it in the file called assessment.js. You can test the code with node assessment.js in your Terminal.


Commit and push your changes.

Submit a pull request.

js-basics-1-assessment's People

Watchers

James Cloos avatar Christine Moses 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.