hello.js

var please = require('share');
console.log('thank you');

NEW !!!

Tuesday, 20 October, 2020 UTC

javascript: Combine Two Broadcasters to Compare Values

We are both fetching a word from an API and type in text into an input box. We need a way to compare those two values to know if our guess is correct. We can do this by combining the two initial broadcasters And using operators to compare their values ... more


Tuesday, 20 October, 2020 UTC

javascript: Define a Function to Set Common Behaviors in Operators

If you find yourself repeating a lot of the same code over and over, this might be an opportunity to write a utility function to capture the repetition and keep it tucked away in a single function. This lesson walks through writing a createOperator utility ... more


Tuesday, 20 October, 2020 UTC

javascript: Use Buffers to Store Values Until a Condition is Met

Buffers give you chance to gather values together until your ready to work with them. This pattern can be used for calculations, string manipulations, and many other scenarios. Consider a solution where splitter argument is a function instead of a value. ... more


Tuesday, 20 October, 2020 UTC

javascript: Start With the API You Want Then Implement

If you can think ahead to how you want your code to look into the future, then you can tackle your problems from the inside out. You design how you want the code to look, then go about implementing the internals. This is similar to a "test driven ... more


Tuesday, 20 October, 2020 UTC

javascript: Use Pipe to Clean Up Functions Wrapping Functions

Rather than continuing to pass functions to functions, we can leveraging a pipe utility to write our functions out in a sequenced list. This makes our code much easier to understand and refactor while expressing the intent of "do this, then this, ... more


Tuesday, 20 October, 2020 UTC

javascript: Transform Values with a Map Operator

Changing a value into something else is a fundamental concept of programming. When dealing with async code, we want to catch the value inside a function and apply a transformation to it. We do this with a map operator. ... more


Tuesday, 20 October, 2020 UTC

javascript: Prevent Certain Values with a Filter Operator

Conditional behavior is another fundamental concept of programming. It's like writing an if statement for async code. A filter operator allows us to only allow through the values that meet our criteria. ... more


Tuesday, 20 October, 2020 UTC

javascript: Create a Win Condition with a mapDone Operator

Many streams of events end when a certain condition is met. When we run into that condition, we'll want to pass down our own custom values. This lessons walks through adding a done condition to hangman and how we can use new operators to control what ... more


Tuesday, 20 October, 2020 UTC

javascript: Create an Operator Function to Modify Behaviors

Let's add another layer of wrapping so that we can override the behavior of broadcasters. Operators are the final big piece that allows us to bend all asynchronous behaviors to our will. The give us a chance to redefine broadcasters and listeners in any ... more


Tuesday, 20 October, 2020 UTC

javascript: Building a Word Matching Game by Composing Callbacks

It's common for a user to enter values that you want to check against your pre-defined values. Let's make a demo of a word game to demonstrate one approach to solving that use case. Try consolidating map(hangmanLogic) even further into a stand-alone hangmanLogic ... more


Tuesday, 20 October, 2020 UTC

javascript: Building a Timer UI by Composing Callbacks

Controlling when a broadcaster starts and stops gives you complete control over your broadcasters. This let's you hook multiple pieces of UI together to offer to the user and allow them to manage the behaviors of your application. This lesson walks through ... more


Tuesday, 20 October, 2020 UTC

javascript: Building a Counter UI by Composing Callbacks

We've written a lot of code up to this point, but let's take a step back and try a demo from scratch to help see the pattern evolve. This lesson walks through creating a counter demo which can add a number when you click an add button or subtract number ... more


Tuesday, 20 October, 2020 UTC

javascript: Solve Callback Hell with Composition

Many APIs in JavaScript rely on callbacks, so when using APIs together, we end up in deeply nested callbacks AKA "Callback Hell". This course solves callback hell through composition by moving all of the nesting into the internals of our helper ... more


Tuesday, 20 October, 2020 UTC

javascript: Passing Values Through Callback Hell

Callback Hell is made up of nested functions. If we compose our functions instead of nesting them, we need to remember to pass values down to the next API that takes a callback. We can do this by setting up a "mapping" behavior in our outer/inner ... more


Tuesday, 20 October, 2020 UTC

javascript: Defining the Broadcaster and Listener Relationship

It's time to set up the core of the pattern we'll be using throughout the entire course. Establishing a contract between functions and rules that we'll follow will allow us to use and define many different functions interchangeably. For many people, "pass ... more


Tuesday, 20 October, 2020 UTC

javascript: Time is a Hidden Variable in JavaScript

Time causes bugs. This is because we often don't know how to handle the many different scenarios that emerge when dealing with asynchronous code. A main goal of this course is to help your feel comfortable attacking bugs due to time so you can build the ... more


Tuesday, 20 October, 2020 UTC

javascript: Compose Closures and Callbacks to Create New Functions

Composition is all about passing one function to another to create a new function. Many libraries have utility functions (which you can write on your own) that allow you to express composition as a list of functions instead of a messy function inside ... more


Tuesday, 20 October, 2020 UTC

javascript: What Is a Callback in JavaScript

If you've used `addEventListener`, `Array.filter`, or many other methods in JavaScript, then you've already used a callback. Callbacks are often invoked inside of APIs of libraries where we don't get to see them called. This course explores internals ... more


Tuesday, 20 October, 2020 UTC

javascript: Pass a Done Symbol when an Async Function is Done

All good things come to an end. The concept of "done" plays a large part in our pattern and asynchronous code in general. We have to be able to handle when a broadcaster has completed its passing values so we can know what to do next. ## Congrats ... more


Tuesday, 20 October, 2020 UTC

javascript: Pass an Array to a Callback with a forOf Function

The patterns we've established can also work well with plain old Objects and Arrays. We just have to capture the behavior of accessing those values inside of our broadcaster so the values can be passed down into a listener. ... more


Tuesday, 20 October, 2020 UTC

javascript: What Is a Closure in JavaScript

When working with closures you'll often hear the words "capture", "wrap", or "enclose". The entire idea behind a closure is to take a variable outside of the function and use that variable inside the function. A closure enables ... more


Tuesday, 20 October, 2020 UTC

javascript: Can a Function Be a Closure and a Callback?

The short answer: "yes". Functions have a lot of names: predicates, lambdas, reducers, etc. It all depends on the usage of the function or if its inputs/outputs match certain rules. This lesson shows how closures and callbacks are both types ... more


Tuesday, 20 October, 2020 UTC

javascript: Combine Multiple Async Behaviors with a Merge Function

We've reached the point where established broadcasters and we can begin to use them together. This lesson walks through creating a `merge` function which can take two broadcasters and listen to both of them. ... more


Tuesday, 20 October, 2020 UTC

javascript: Create a Buffer to Pair Values Together with Zip

Functions returning functions returning functions can begin to look a bit unwieldy. The arrow function has helped the syntax a lot, but maybe using a curry utility function to combine all the arguments into a single function will help your syntax look ... more


Tuesday, 20 October, 2020 UTC

javascript: Match Function Requirements with Lodash Partial and Flip

Functions returning functions returning functions can begin to look a bit unwieldy. The arrow function has helped the syntax a lot, but maybe using a curry utility function to combine all the arguments into a single function will help your syntax look ... more


Tuesday, 20 October, 2020 UTC

javascript: Use Lodash Curry When Functions Return Functions

Functions returning functions returning functions can begin to look a bit unwieldy. The arrow function has helped the syntax a lot, but maybe using a `curry` utility function to combine all the arguments into a single function will help your syntax look ... more


Tuesday, 20 October, 2020 UTC

javascript: Return a Function to Cancel an Async Behavior

Cancelation is huge part of async code, but again, APIs in JavaScript are inconsistent. We can develop our own pattern to allow us full control over how cancelation behaves so that our functions can work together. ... more


Tuesday, 20 October, 2020 UTC

javascript: Create a Utility Function to Control setInterval

We also need to control setInterval since so many async scenarios rely on timers. The pattern we've created so far matches up nicely and our confidence grows that we'll be able to use these functions together. ... more


Tuesday, 20 October, 2020 UTC

javascript: Wrap addEventListener in a Function for More Control

As we develop our pattern further, we can see how it can apply to all async scenarios in JavaScript. All user events go through addEventListener, so making sure we have control over how addEventListener interacts with other APIs, like setTimeout, gives ... more


Tuesday, 20 October, 2020 UTC

javascript: Create a Function to Configure setTimeout

JavaScript is full of inconsistent APIs. Wrapping those APIs in functions allows you to have full control over how to configure them and make them more reusable. This lesson walks through wrapping setTimeout in a function that allows you to pass in custom ... more