Giter Site home page Giter Site logo

cs-bin-solutions's Introduction

cs-bin-solutions's People

Contributors

allisons11 avatar katesmatthews avatar railsstudent avatar timeowilliams avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar

cs-bin-solutions's Issues

Some error in solutions

// Challenge 7
const intersection = (arrays) => {
return arrays.reduce((acc, curr) => {
return curr.filter(el => acc.includes(el));
});
};

// console.log(intersection([5, 10, 15, 20], [15, 88, 1, 5, 7], [1, 10, 15, 5, 20]));
Uncaught TypeError: curr.filter is not a function

Should be:
const intersection = (...arrays) => {
return arrays.reduce((acc, curr) => {
return curr.filter(el => acc.includes(el));
});
};

and similar error downside :)

Objects created by userFactory can access sharePublicMessage method

cs-bin-solutions/oop.js

Lines 181 to 188 in 20de7d4

function adminFactory(name, score) {
const admin = new userFactory(name, score);
admin.type = 'Admin';
return admin;
}
/* Put code here for a method called sharePublicMessage*/
userFunctionStore.sharePublicMessage = () => console.log('Welcome users!');

Above issue is with respect to Extension Question for - http://csbin.io/oop
The code does not prevent userFactory to access sharePublicMessage method.. Instead the solution should be to use Object.create in adminFactory function:

function adminFactory(name, score) {
  // Put code here
  let newAdminObj = userFactory(name,score);
  newAdminObj = Object.create(adminFunctionStore);
  newAdminObj.type = "Admin";
  return newAdminObj;
}

// Put code here for a method called sharePublicMessage

adminFunctionStore.sharePublicMessage = () => console.log("Welcome users!")

potential bug in the comments of the intersection function from challenge 7

Hello,

I started following your course and correct me if I'm wrong but the function intersection expects one parameter arrays which should be of type array.

However in your comment written just below the challenge 7, you pass in 3 arguments.

// console.log(intersection([5, 10, 15, 20], [15, 88, 1, 5, 7], [1, 10, 15, 5, 20]));
**

I think you might have intended to write:

// console.log(intersection([[5, 10, 15, 20], [15, 88, 1, 5, 7], [1, 10, 15, 5, 20]]));

On a side not, thanks, I quite enjoy the course so far.

missing solutions

Some of the solutions to the challenges are missing.

The solutions that are missing are:

  • async.js misses exercises 8,9,10
  • callback.js misses 12 up to 24
  • closures.js misses 8 up to 19

Not missing anything:

  • functional.js doesn't miss anything
  • oop.js doesn't miss anything

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.