Code Monkey home page Code Monkey logo

javascript-intro-to-functions-lab's Introduction

JavaScript Intro to Functions Lab

Objectives

  • Practice writing functions
  • Explain basics of working with strings
  • Explain the difference between return and logging
  • Practice using return and console.log()

Introduction

Welcome to the JavaScript functions lab! You'll notice a few new things in this lesson that we haven't encountered before. Don't worry, we'll walk you through them.

Even if you've walked through some of this material before, it's a good idea to review as we code-along — we're writing functions now, after all.

Code-Along

For now, open up index.js in your text editor. You should see, well, nothing. We'll fix that soon.

Now open up test/root.js. Hey, there's something! What's all of this stuff doing?

At the very top of the file, you'll see

global.expect = require('expect');

const babel = require('babel-core');
const jsdom = require('jsdom');
const path = require('path');

This might be a bit bewildering, but all we're doing is referencing different libraries that help us run your tests. A library is code that someone else (usually multiple someone elses) wrote for our use. Note that require won't work out of the box in the browser. We're actually running our tests in a different environment.

If you go to test/index-test.js, you'll see

describe('shout(string)', function(){
  // there's stuff in here, too
})

describe is a function provided by our test runner (in this case, we're using Mocha) — it's basically a container for our tests.

Let's take a closer look at that describe():

describe('shout(string)', function(){
  it('receives one argument and returns it in all caps', function() {
    // we'll get to this in a sec
  })
})

These internal describe() calls are used for describing the functions that you're going to write. In this case, the test is saying, "Okay, I think there's going to be a function called shout, and it should take one argument (it doesn't actually matter what the argument is called, but string, is nice and specific, don't you think?). It should return that argument in all caps.

Finally, we have

expect(shout('hello')).toEqual('HELLO')

which says that it expects a call to shout() with the string 'hello' will equal the string 'HELLO'. This is the actual test — otherwise called a spec, expectation, or assertion — for this function. We can have more than one test per function, but let's start with this one.

Running the Tests

To run the tests, run learn test in the terminal in your Learn IDE. The first output you'll see will look like

> [email protected] test /Users/mbenton/Desktop/curriculum-team/junk/javascript-intro-to-functions-lab
> mocha -R mocha-multi --reporter-options spec=-,json=.results.json --timeout 10000



  shout(string)
    1) receives one argument and returns it in all caps

  whisper(string)
    2) receives one argument and returns it in all lowercase

  logShout(string)
    3) calls console.log() its one argument in all caps

  logWhisper(string)
    4) calls console.log() its one argument in all lowercase

  sayHiToGrandma(string)
    5) returns "I can't hear you!" if `string` is lowercase
    6) returns "YES INDEED!" if `string` is uppercase
    7) returns "I love you, too." if `string` is "I love you, Grandma."`


  0 passing (99ms)
  7 failing

  1) shout(string)
       receives one argument and returns it in all caps:
     ReferenceError: shout is not defined
      at Context.<anonymous> (test/index-test.js:4:5)
      at processImmediate (internal/timers.js:456:21)

  2) whisper(string)
       receives one argument and returns it in all lowercase:
     ReferenceError: whisper is not defined
      at Context.<anonymous> (test/index-test.js:10:5)
      at processImmediate (internal/timers.js:456:21)

  3) logShout(string)
       calls console.log() its one argument in all caps:
     ReferenceError: logShout is not defined
      at Context.<anonymous> (test/index-test.js:18:5)
      at processImmediate (internal/timers.js:456:21)

  4) logWhisper(string)
       calls console.log() its one argument in all lowercase:
     ReferenceError: logWhisper is not defined
      at Context.<anonymous> (test/index-test.js:30:5)
      at processImmediate (internal/timers.js:456:21)

  5) sayHiToGrandma(string)
       returns "I can't hear you!" if `string` is lowercase:
     ReferenceError: sayHiToGrandma is not defined
      at Context.<anonymous> (test/index-test.js:40:5)
      at processImmediate (internal/timers.js:456:21)

  6) sayHiToGrandma(string)
       returns "YES INDEED!" if `string` is uppercase:
     ReferenceError: sayHiToGrandma is not defined
      at Context.<anonymous> (test/index-test.js:44:5)
      at processImmediate (internal/timers.js:456:21)

  7) sayHiToGrandma(string)
       returns "I love you, too." if `string` is "I love you, Grandma."`:
     ReferenceError: sayHiToGrandma is not defined
      at Context.<anonymous> (test/index-test.js:48:5)
      at processImmediate (internal/timers.js:456:21)



npm ERR! Test failed.  See above for more details.

Hm, seven failed tests. Let's see if we can get that first test to pass. Open up index.js.

When we write our code, we follow the guidance of the tests. Remember the line, describe('shout(string)', function() { ... }). Well, we know that we need a function called shout that accepts an argument — let's add that first. In index.js:

function shout(string) {
}

And what should that function do? Well, the it() description tells us that it "receives one argument and returns it in all caps".

Okay, so with that information, we know that our function should look like this:

function shout(string) {
  return string
}

But how do we make string all caps? JavaScript has a method for that! It's called toUpperCase(). We can call it on any string:

'Hello!'.toUpperCase() // 'HELLO!'

So let's try it with our shout() function:

function shout(string) {
  return string.toUpperCase()
}

And run our tests again:

learn test
shout(string)
    ✓ receives one argument and returns it in all caps

  whisper(string)
    1) receives one argument and returns it in all lowercase

  logShout(string)
    2) calls console.log() its one argument in all caps

  logWhisper(string)
    3) calls console.log() its one argument in all lowercase

  sayHiToGrandma(string)
    4) returns "I can't hear you!" if `string` is lowercase
    5) returns "YES INDEED!" if `string` is uppercase
    6) returns "I love you, too." if `string` is "I love you, Grandma."`


  1 passing (108ms)
  6 failing

  1) whisper(string)
       receives one argument and returns it in all lowercase:
     ReferenceError: whisper is not defined
      at Context.<anonymous> (test/index-test.js:10:5)
      at processImmediate (internal/timers.js:456:21)

  2) logShout(string)
       calls console.log() its one argument in all caps:
     ReferenceError: logShout is not defined
      at Context.<anonymous> (test/index-test.js:18:5)
      at processImmediate (internal/timers.js:456:21)

  3) logWhisper(string)
       calls console.log() its one argument in all lowercase:
     ReferenceError: logWhisper is not defined
      at Context.<anonymous> (test/index-test.js:30:5)
      at processImmediate (internal/timers.js:456:21)

  4) sayHiToGrandma(string)
       returns "I can't hear you!" if `string` is lowercase:
     ReferenceError: sayHiToGrandma is not defined
      at Context.<anonymous> (test/index-test.js:40:5)
      at processImmediate (internal/timers.js:456:21)

  5) sayHiToGrandma(string)
       returns "YES INDEED!" if `string` is uppercase:
     ReferenceError: sayHiToGrandma is not defined
      at Context.<anonymous> (test/index-test.js:44:5)
      at processImmediate (internal/timers.js:456:21)

  6) sayHiToGrandma(string)
       returns "I love you, too." if `string` is "I love you, Grandma."`:
     ReferenceError: sayHiToGrandma is not defined
      at Context.<anonymous> (test/index-test.js:48:5)
      at processImmediate (internal/timers.js:456:21)



npm ERR! Test failed.  See above for more details.

Hey! We got one to pass! Six left.

Your Turn

Now it's your turn to get the rest of the tests to pass. Note that some of them require you to use console.log() instead of return — follow the guidance of the tests!

In this lab, we're writing functions that "speak" at different volumes — they whisper or they shout. The next test is similar to the first:

1) whisper(string)
       receives one argument and returns it in all lowercase:
     ReferenceError: whisper is not defined
      at Context.<anonymous> (test/index-test.js:10:5)
      at processImmediate (internal/timers.js:456:21)

This test is telling us that whisper(string) receives one argument and returns it in all lowercase. At the moment, the test is failing because whisper is not defined.

Note: Just like .toUpperCase() changes any string to all uppercase in JavaScript, .toLowerCase() (e.g., 'HELLO'.toLowerCase()) changes any string to all lowercase.

The next two tests are checking to see if a specific string is logged when a function is called. You will still need to use the .toUpperCase() and .toLowerCase() methods for logShout(string) and logWhisper(string). Keep in mind though that these tests are not looking for return values, only logs.

The final function you need to create is sayHiToGrandma(). Grandma is a bit hard of hearing, so whispering can be a bit difficult, but she'll always hear you if you say, "I love you, Grandma." This time, you will need to return different strings depending on the string passed into the function.

Note: Although there are 3 tests for sayHiToGrandma(), you only need to write one function. This function should be able to handle all three test conditions:

  • If the string that is passed into the function is all lowercase, the function should return "I can't hear you!"
  • If the string that is passed into the function is all uppercase, the function should return "YES INDEED!"
  • If the string that is passed into the function is equal to "I love you, Grandma.", the function should return "I love you, too."

How do we check if a string is all lowercase or all uppercase?

var uppercase = "HELLO!"

uppercase.toUpperCase() === uppercase // true

var lowercase = 'hello!'

lowercase.toLowerCase() === lowercase // true

var mixedCase = 'Hi there!'

mixedCase.toLowerCase() === mixedCase // false

mixedCase.toUpperCase() === mixedCase // false

We can simply check whether the string is the same when we convert it to uppercase or lowercase! (The lines with the === comparisons are the ones that check). If it's the same, then it was already in that case; if not, then it's either in the other case or it's mixed case. Now that we know how to compare strings, how can we use these comparisons to conditionally return different strings?

Remember that punctuation is important! Humans might be able to understand that "I love you Grandma" is close enough to "I love you, Grandma." and means the same thing but JavaScript will not consider these equal!

Good luck! When all tests are passing, be sure to run learn submit!

View Intro to Functions Lab on Learn.co and start learning to code for free.

javascript-intro-to-functions-lab's People

Contributors

7kingdavid7 avatar alpha-convert avatar annjohn avatar aturkewi avatar aviflombaum avatar cernanb avatar dakotalmartinez avatar drakeltheryuujin avatar egomadking avatar gj avatar ivalentine avatar jessrudder avatar jnoconor avatar kwebster2 avatar lisaychuang avatar lizbur10 avatar maxwellbenton avatar pletcher avatar wolfhoward avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

javascript-intro-to-functions-lab's Issues

Lesson folder not shown in IDE

After I run Open javascript-intro-to-functions-lab-bootcamp-prep-000, the lesson folder does not appear on the left hand side of the IDE. I have tried logging out, and re-opening the lesson. Still not working out for me. Any suggestions?

Thanks.

Root.js vs index-test

Hey Guys, in the lesson content you make a reference to index-test.js, but i think you actually mean root.js.

program test error i thing.

i was doing the program test i changed and save something but now instead of 7 test its only showing me 6 test when i try to run the program.

sayHiToGrandma

Hey I'm trying to get the function working that's supposed to say "I can't hear you" when all you enter is lowercase letters.
I'm not quite sure what the function's supposed to be. Could someone help me?

Strange error occurring while trying to learn test 'Intro To Functions' lab.

Hello! I have finished the code for 'Intro To Functions' lab and it went though as 'all tests passed' on the lesson web page, I was able to submit it and move onto the next lesson, however every time I run it I get this message:

> [email protected] test /home/tkcorrea89-110957/code/labs/javascript-intro-to-functions-lab-bootcamp-prep-000
> mocha -R mocha-multi --reporter-options nyan=-,json=.results.json
 0   __,------,
 1   __|  /\_/\
 0   _~|_( x .x)
     _ ""  ""
  0 passing (295ms)
  1 failing
  1)  "before all" hook:
     SyntaxError: /home/tkcorrea89-110957/code/labs/javascript-intro-to-functions-lab-bootcamp-prep-000/index.js: Unexpected token, expected ; (10:8)
     8 | }
     9 |
  > 10 | funtion logShout(string) {
       |         ^
    11 |   console.log(string)
    12 | }
    13 |
      at Parser.pp$5.raise (node_modules/babylon/lib/index.js:4454:13)
      at Parser.pp.unexpected (node_modules/babylon/lib/index.js:1761:8)
      at Parser.pp.semicolon (node_modules/babylon/lib/index.js:1742:38)
      at Parser.pp$1.parseExpressionStatement (node_modules/babylon/lib/index.js:2236:8)
      at Parser.pp$1.parseStatement (node_modules/babylon/lib/index.js:1911:17)
      at Parser.pp$1.parseBlockBody (node_modules/babylon/lib/index.js:2268:21)
      at Parser.pp$1.parseTopLevel (node_modules/babylon/lib/index.js:1778:8)
      at Parser.parse (node_modules/babylon/lib/index.js:1673:17)
      at parse (node_modules/babylon/lib/index.js:7246:37)
      at File.parse (node_modules/babel-core/lib/transformation/file/index.js:517:15)
      at File.parseCode (node_modules/babel-core/lib/transformation/file/index.js:602:20)
      at node_modules/babel-core/lib/transformation/pipeline.js:49:12
      at File.wrap (node_modules/babel-core/lib/transformation/file/index.js:564:16)
      at Pipeline.transform (node_modules/babel-core/lib/transformation/pipeline.js:47:17)
      at Object.transformFileSync (node_modules/babel-core/lib/api/node.js:152:10)
      at Context.<anonymous> (test/root.js:8:29)
npm ERR! Test failed.  See above for more details.

No matter what I do I get it. I even tried deleting the lesson files and starting fresh, and It worked fine for the first two tests and then began giving me this error again.

README update

The README for this lesson states to open test/index-test.js to find the code referencing the testing library used. This should be updated to test/root.js.

help in Functions

hey guys could anyone help me to solve this to make it pass in mocha. . i have confused . . i solve the first and the sec part but from the third i can't . . plz help

describe('logShout(string)', function() {
it('calls console.log() its one argument in all caps', function() {
const spy = expect.spyOn(console, 'log').andCallThrough()

logShout('hello')

expect(spy).toHaveBeenCalledWith('HELLO')

console.log.restore()

})
})

describe('logWhisper(string)', function() {
it('calls console.log() its one argument in all lowercase', function() {
const spy = expect.spyOn(console, 'log').andCallThrough()

logWhisper('HELLO')

expect(spy).toHaveBeenCalledWith('hello')

console.log.restore()

})
})

describe('sayHiToGrandma(string)', function() {
it('returns "I can't hear you!" if string is lowercase', function() {
expect(sayHiToGrandma('hello')).toEqual("I can't hear you!")
})

it('returns "YES INDEED!" if string is uppercase', function() {
expect(sayHiToGrandma('HELLO')).toEqual("YES INDEED!")
})

it('returns "I love you, too." if string is "I love you, Grandma."`', function() {
expect(sayHiToGrandma("I love you, Grandma.")).toEqual("I love you, too.")
})
})

Intro to Functions Lab-Cannot get last test to pass

Hi there:
i'm wracking my brain to figure out why the last test won't pass, i've reordered conditionals, tried using a mixedcase example like the lab and the below keeps returning "YES, INDEED!" for sayHiToGrandma("I love you, Grandma.") and I can't figure out why.
Many Thanks!

Below is my code and the error message.

  if (string === string.toLowerCase()) {
    return ("I can't hear you!");
  } if (string === string.toUpperCase()); {
    return ("YES INDEED!");
  } if (string === 'I love you, Grandma.'); {
    return ("I love you, too.");
  }
}
sayHiToGrandma(whisper('heLlo'));
sayHiToGrandma(shout('HEllO'));
sayHiToGrandma("I love you, Grandma."); ```

### error message

``` 1) sayHiToGrandma(string) returns "I love you, too." if `string` is "I love you, Grandma."`:
      Error: Expected 'YES INDEED!' to equal 'I love you, too.'
      + expected - actual
      -YES INDEED!
      +I love you, too.
      at assert (node_modules/expect/lib/assert.js:29:9)
      at Expectation.toEqual (node_modules/expect/lib/Expectation.js:81:30)
      at Context.<anonymous> (test/index-test.js:48:52) ```

typo

I think there is a typo in this lesson:

"For now, open up index.js in your text editor. You should see, well, nothing. We'll fix that soon.
Now open up test/index-test.js. Hey, there's something! What's all of this stuff doing?
At the very top of the file, you'll see"

but the code that is shown is actually found in the test/root.js

Am I crazy?

Lesson Instructions are different from file details in Learn IDE

I followed the directions listed below, but the text is different from what is listed in the lesson.

"
Now open up test/index-test.js. Hey, there's something! What's all of this stuff doing?
At the very top of the file, you'll see

global.expect = require('expect'); const babel = require('babel-core'); const jsdom = require('jsdom'); const path = require('path');
"

In Learn IDE under file "test", "index-test.js", the 1st 6 lines are:

describe('shout(string)', function() { it('receives one argument and returns it in all caps', function() { expect(shout('hello')).toEqual('HELLO') }) })

Am I doing something wrong?

sayHiToGrandma index-test.js expects wrong string return

As the title says, in the sayHiToGrandma the index-test.js expects strings such as "I can't hear you" or "YES INDEED" when calling the sayHiToGrandma string calls "hello" or "HELLO" respectively. Another example is in the last text, calling the string returns "I love you Grandma." when expecting "I love you too." instead of expecting "I love you Grandma" then returning "I love you too." Makes the lab require going to index-test.js to change the expected values to the actual string values. I may be wrong and just inept, but it seems like the lab tests are broken.

passed my logShout function a function, and it passed

Hello, while working on this exercise, I wrote:

logShout(function) { console.log(shout) }

and did the same for the logWhisper function.

When I ran the exercise, it said I passed, but the console kicked out some errors about functions and other stuff.

Can you pass a function another function? That seemed to be the obvious solution to me since we built those other two functions, but I might have done this incorrectly, even though I passed the exercise.

attached are screenshots of the passing code and the error the console spit out.

screen shot 2016-12-01 at 7 36 12 pm

screen shot 2016-12-01 at 7 36 45 pm

Intro to Function Lab Errors

In the "Intro to Function Lab" when I first ran learn test, my result was 0 passing and 7 failing. The first image inside the lab shows 0 passing and 4 failing. I'm not sure if the file in the Learn IDE or the image in the learn.co "Intro to Function Lab" is incorrect. When I wrote the function as the lab directed, and ran the test a second time. My result was 1 passing, and 6 failing. The second image showed 1 passing and 3 failing.

Inside "test/index-test.js" there is a line of code in the first "describe" which is written like this "expect(shout('hello')).toEqual('HELLO')". Inside the learn.co "Intro to Function Lab" there is an example written like this "expect(shout('hello')).to.equal('HELLO')". Which is correct? ".toEqual" or ".to.equal"?

Under "YOUR TURN" at the bottom next to "(e.g., 'HELLO' .toLowerCase() )" this is written. "changesany" I feel this should be a space between"changes" and "any".

Please let me know if all of this can be corrected. Thank you.

wrong file?

I think a file "javascript-intro-to-functions-lab/test/index-test.js" is a wrong file.
It's not same to what is displayed in "README.md".

For example, the text below doesn't exist in this file.

'''
const expect = require('expect')
const fs = require('fs')
const jsdom = require('mocha-jsdom')
const path = require('path')
'''

The Code-Along section needs to be updated.

Hi. The Code-Along portion of this lab makes reference to a "sandbox analogy from earlier". However, this sandbox analogy isn't in any of the previous lessons in the Bootcamp Prep.

I don't know if the analogy is in one of the Bootcamp lessons, rather than the Bootcamp Prep lessons, or if it just doesn't exist anymore. Either way, the lesson needs to be updated, if anyone has the time.

Thanks and good luck!

Steven

Incorrect File Being Referenced

Hi, at the beginning of the lab the incorrect file is referenced.
screen shot 2017-03-30 at 11 13 31 am
This segment of code is not located in index-test.js, but in root.js in the Learn IDE.
screen shot 2017-03-30 at 11 15 37 am

Intro to Functions Lab

Below are the functions that I have written to satisfy the specs for the intro to functions lab. When I enter these two function into the browser, the answers are as expected. Would someone mind taking a look at the requirements in the program? If my assertion isn't correct I apologize and I will be sure to ask my questions on learn from now on.

function sayHiToGrandma(string) {
if (string.toLowerCase() === string) {
return "I can't hear you!";
}
}

function sayHiToGrandma(string) {
if (string.toUpperCase() === string){
return 'YES INDEED!';
}
}

intro to functions lab

"For now, open up index.js in your text editor. You should see, well, nothing. We'll fix that soon.
Now open up test/index-test.js. Hey, there's something! What's all of this stuff doing?"

switch test/index-test.js with root.js

Wrong file being referenced

At the beginning of the Code Along portion, it says

For now, open up index.js in your text editor. You should see, well, nothing. We'll fix that soon.
Now open up test/index-test.js. Hey, there's something! What's all of this stuff doing?
At the very top of the file, you'll see `global.expect = require('expect');

const babel = require('babel-core');
const jsdom = require('jsdom');
const path = require('path');`

The file that has that code is actually the root.js (at least for me it is).

sayHiToGrandma function

Do I need to write a if else statement inside this function to check all three conditions ? Thanks

Something wrong

When it says: Now open up 'test/index-test.js' it's wrong. It should be 'test/root.js' (IN THE FIRST ONE!).

Intro to functions lab

At the beginning of the intro to function lab, it says to open test/index-test.js in the IDE to follow along. This file has different code than the lesson says. The root.js file has the code that test/index-test.js is supposed to have.

Difference between webpage and README.md

webpage

|| The above is correct, but on the README.md file, it looks like this:

readme

The issue is that both of these files exist, and part of the reference code is in the root.js file, and the other part is in the index-test.js file

Please resolve this issue to make the lab a little more coherent for some people.

typo in Code-Along second graf

at the start of the Code-Along section:

"Now open up test/index-test.js. Hey, there's something! What's all of this stuff doing?
At the very top of the file, you'll see
global.expect = require('expect');

const babel = require('babel-core');
const jsdom = require('jsdom');
const path = require('path');"

--
I think this should be "Now open up test/root.js." ???

Mocha Code Snippets Use Incorrect Syntax

The first two code snippets referencing test/index-test.js use an incorrect mixing of ES5 and ES6+ syntax, i.e. using the function keyword in direct conjunction with the "husky" arrow.

Incorrect file referenced?

Hello, I was looking at the beginning of the code along. The file referenced does not have
global.expect = require('expect'); const babel = require('babel-core'); const jsdom = require('jsdom'); const path = require('path');

It appears the wrong file is referenced (index-test.js) instead of root.js which does have the libaries referenced.

shout/whisper/grandma lab

I don't understand what the following code wants fed into it:

describe('logShout(string)', function() {
  it('calls console.log() its one argument in all caps', function() {
    const spy = expect.spyOn(console, 'log').andCallThrough()

    logShout('hello')

    expect(spy).toHaveBeenCalledWith('HELLO')

    console.log.restore()
  })
})

This is an example of what I'm currently trying to feed into lougShout:

 function logShout(string){
   console.log(string.toUpperCase)
 }

Obviously it wants more than that. The error message on the test reads:

Error: spy was never called with [ 'hello' ]

What do I do to call spy? The instructions say replace 'return' with 'console.log()'. I guess it wants some other input, which is what, exactly?

How does const work (of const spy origin)? I don't recall working with this at all. I, therefore, have no clue what it does.

What is this spyOn thing? Again, no clue what it's referencing.

JavaScript intro to functions lab

The README.md and index-test.js files do not correspond. The README file incorrectly describes the top of the test file, the directions for the first part of the test do not satisfy the requirements of the test (the description has an exclamation point, for example), the picture used shows a four-part test (the actual test is seven parts), etc.

Problem with Javascript Intro to Labs Function Lesson - index.js test if statements sayHiToGrandma

Hi, I'm experiencing an issue with the Javascript Intro to Labs Function. When I run the solutions for the below test problems, learn IDE will return one of the below test problems that has already been solved. There seems to be a glitch with the below problems on learn IDE for this lesson, can someone please look into this?

  1. sayHiToGrandma(string) returns "I can't hear you!" if string is lowercase:
    Error: Expected undefined to equal 'I can't hear you!'
    at assert (node_modules/expect/lib/assert.js:29:9)
    at Expectation.toEqual (node_modules/expect/lib/Expectation.js:81:30)
    at Context. (test/index-test.js:40:37)

  2. sayHiToGrandma(string) returns "YES INDEED!" if string is uppercase:
    Error: Expected undefined to equal 'YES INDEED!'
    at assert (node_modules/expect/lib/assert.js:29:9)
    at Expectation.toEqual (node_modules/expect/lib/Expectation.js:81:30)
    at Context. (test/index-test.js:44:37)

  3. sayHiToGrandma(string) returns "I love you, too." if string is "I love you, Grandma."`:
    Error: Expected undefined to equal 'I love you, too.'
    at assert (node_modules/expect/lib/assert.js:29:9)
    at Expectation.toEqual (node_modules/expect/lib/Expectation.js:81:30)
    at Context. (test/index-test.js:48:52)

Technical Application Submitted Early

Hello,

I had just started the technical application and finished the string chapter, then on the next page I was issued a prompt in the console, that read something like, "You are about to open a lesson, beyond your current lesson." It prompted a '[Yn]' response, so I type 'Y', and then it submitted all of my materials and I cannot go back and resubmit. Can someone please help me if I can solve this, or perhaps have it reset?

Thanks,

Nate

Error

I keep getting the following error when I try to run my code:

  1. arrays "before all" hook:
    Error: timeout of 2000ms exceeded. Ensure the done() callback is being called in this test.

Does anyone have the same problem?

Lab allowed me to proceed early

the lab went through as completed when I had only fixed 2 of the 7 errors. Not sure if this was part of the design or an error

README screenshots inconsistent with tests

@aturkewi The screenshots of the learn test output in the README show 4 total tests, but the lab has since been updated to have 7 total tests. I have had several students from different tracks asking if that is an issue. I think it would be helpful to update the screenshots to reflect the current tests.

Attached are updated screenshots for quick reference:
screen shot 2017-01-31 at 11 54 18 am
screen shot 2017-01-31 at 10 13 36 am

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.