Giter Club home page Giter Club logo

adsfdasf's Introduction

๐Ÿ•๏ธ Welcome to your new cabin!

This is the camp.dev camp template for you to get started creating your very own course. Follow the instructions and this repository will automatically create the neccessary config files and sync every time you commit - have fun!

adsfdasf's People

Contributors

lazyplatypus avatar

Watchers

 avatar

adsfdasf's Issues

Week 1


files: notes.md
week: 1
step: 1
name: Week 1 Step 1

Week 1 Step 1

Git:

Run the following commands before starting:

In your main branch: git pull to pull any updates.

Delete your previous branches locally git branch -d previousBranchName, and remotely git push origin --delete previousBranchName

Change your branch to a new one for this step: git checkout -b week-1-step-5

git pull again just in case.

What is JavaScript?

Before starting, let's look into all the things that make JavaScript stand out from other programming languages and determine what it can be used for.

What is Node?

Node.js is an open source runtime environment that will allow us to run our code outside of a web browser (i.e. no need for HTML, CSS to run the code).

Synchronous vs Asynchronous Functions

JavaScript is, by default, a synchronous language. This means that all the code in JS will be run line by line, block by block.

But what happens when a part of your code has to wait for another part? Let's say one of your functions is writing code to a database, and the next function needs something from that database. Since writing to a database can take time, if both functions are synchronous it is very possible that your second function will try to access data before the first function was able to complete executing.

This calls for the need to have async functions, that can wait for something to be completed before they run a piece of code.

How do we make an asynchronous function?

// typical synchronous function definition:

function function_1() {
	// ....contents....
}

// async function definition:

async function function_2() {
	// ....contents....
}

We will elaborate on how to make the async function wait in the future. These definitions are only to let the program know that the function function_2 is not synchronous.

Review:

Write a javascript program with the function definitions for an asynchronous function and a synchronous function.

Create a notes.md file and describe what the difference between asynchronous and synchronous functions is in your own words and come up with an example of when you would use either. Add your code to the notes.md, and make a pull request to close this issue and continue.

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.