Coder Social home page Coder Social logo

asabeneh / 30-days-of-javascript Goto Github PK

View Code? Open in Web Editor NEW
41.0K 839.0 9.6K 122.05 MB

30 days of JavaScript programming challenge is a step-by-step guide to learn JavaScript programming language in 30 days. This challenge may take more than 100 days, please just follow your own pace. These videos may help too: https://www.youtube.com/channel/UC7PNRuno1rzYPb1xLa4yktw

JavaScript 98.19% HTML 1.81%
30daysofjavascript javascript-for-everyone css html javascript react angular js json node nodejs typescript vue d3 d3js redux challenge programming webdevelopment website

30-days-of-javascript's Issues

Day 1 Node JS pictures

would be great if the pictures could be updated. It looked pretty different when I installed

Math.random

"this gives: min 0 and max 10.99"

0.99999 * 10 = 9.99999

Exercise: Level 2 Q.1

Create a separate countries.js file and store the countries array in to this file, create a separate file web_techs.js and store the webTechs array in to this file. Access both file in main.js file

I have tried import export module but not working for me...

jus

There is a typo here
In Day 1 is
let emptyValue = nulll

Thanks For this Tut.

Day:5 Array

I had a problem, I do not fully understand how to find the average middle country in the array.
I realized that you need to decompose each country into letters and find the average word length. But how to do it I can't imagine

Day-2 String Methods - match()

let txt = 'In 2019, I ran 30 Days of Python. Now, in 2020 I am super exited to start this challenge'
let regEx = /\d+/

              console.log(txt.match(regEx))   -  // ["2", "0", "1", "9", "3", "0", "2", "0", "2", "0"]   

Ans for this match -

              [2019, index: 3, input: "In 2019, I ran 30 Days of Python. Now, in 2020 I am super exited to start this challenge", groups: undefined]

It returns a array with the first match in regex

how to write good code for this example

Thanks for your document.
I have some question.

I input two number. It will search the num1.csv to response to result value. And add it.

case1:
Input: 1 , 2
process: 1 => 10, 2 => 20
output: 10 + 20 = 30

case2:
Input: 1 , 2 , 3, 4
process: 1 => 10, 2 => 20, 3 => 30, 4 => 40
output: 10 + 20 +30 + 40 = 100

How can I optimize the code when add some input?

Test.js

// require csvtojson module
const CSVToJSON = require('csvtojson');


function compute() {
    let input = 1;
    getNum1(input).then(output => {
        //console.log(output);
        input = 2 ;
        getNum1(input).then(output2 => {
        let finalResult = parseInt(output) + parseInt(output2)
        console.log(finalResult);
        })
    })
}


async function csv2json(csvFilePath) {
    return jsonArray = await CSVToJSON().fromFile(csvFilePath);
}

function getNum1(input) {
    return csv2json('num1.csv').then((blob) => {
        for (var obj in blob) {
            if (blob[obj]['input'] == input) {
                let result = blob[obj]['result'];
                return result;
            }
        }
    }).catch(e => console.log(e));
}


compute()

num1.csv

input,result
5,50
4,40
3,30
2,20
1,10

About translation!

Hello!
Thank you for your help!
I'd like to create a new repo to translate this repo to Chinese?Would you like to give me the allowance?

Best wishes!

permission

can i use your work for commercial use (with credit)?

Day 2: Functions Defined as Data Type

In the Day 2 markdown file, "02_day_data_types.md". Functions are labeled as a non-primitive data type in this markdown file. Functions are themselves callable objects in javascript. As this is a tutorial for beginners, it might be best to leave functions out of that definition. Labeling functions in this way is not completely true and could cause confusion. A good alternative may be labeling the special data types, null and undefined, and having an objects section where it is explained that objects include functions, arrays, maps, and so on.

This is merely a suggestion, hope it is helpful.
Thank you!

Number of order is wrong

Hi,

i am doing the 30days of Javascript from this repository and i have seen that in the Exercise Level 3 of the Day-4 has the order has been wrongly updater inseated of 1. and 2 it is entered in 1. & 1.

Day 4

Day 1 of JavaScript: Incorrectly Named File

Under the following file path:
Asabeneh/30-Days-Of-JavaScript/01_Day_Introduction/01_day_starter/varaibles.js

The file varaibles.js should be named variables.js instead.

Typo on Exercice 2 of Day4

Grading for B should be, between 70-79, other logic breaks.

Excerp:
Exercises: Level 2
Write a code which can give grades to students according to theirs scores:
80-100, A
70-89, B

👏

This is exactly what i was looking for, for a long time.

typo

just a small thing for day5
In the part : Creating static values with fill
output for the last sample should be [4,4,4,4]

thx for this tute!

Undeclared variable in Day 1

Hi,

Thanks for this amazing resource!! It is really well put together and super easy to follow.

Unless I missed something along the way, the following console.log throws and error since age has not yet been declared:

image

Thanks again - I'm looking forward to working through the rest of the days!!

if else if else else

Actually on day 4, there are some titles and paragraphs, making references to: "if else if else else"

https://github.com/Asabeneh/30DaysOfJavaScript/blob/master/04_Day/04_day_conditionals.md#if-else-if-else-else

I think the meaning of this title would be something like: " if else if else" without the extra "else" at the end.

But don't really like how its look, I preferrer something like: "If else and else if" or just "else if".

So I propose changing this title for one of these two options:

  1. if else and else if
  2. else if

Please comment your suggestions.

Day 2 - not showing output as expected

Hi,

Thanks for this amazing resource!! It is really well put together and super easy to follow.

Unless I missed something along the way, the following console.log not showing the output as expected in your resource.

The output i expected:
expected-output

The output i get:
current-output

Day 1 - Examples: Variables

The output of the first example is different than the actual output

// Declaring different variables of different data types

let firstName = 'Asabeneh'  // first name of a person
let lastName = 'Yetayeh'    // last name of a person
let country = 'Finland'     // country
let city = 'Helsinki'       // capital city
let isMarried = true       // boolean data type

console.log(firstName, lastName, country, city, isMarried)
Asabeneh Yetayeh Finland Helsinki 100 True

100 is not part of the output, so I suggest either removing the 100 or changing the code to:

// Declaring different variables of different data types
let firstName = 'Asabeneh' // first name of a person
let lastName = 'Yetayeh' // last name of a person
let country = 'Finland' // country
let city = 'Helsinki' // capital city
let age = 100 // age in years
let isMarried = true

console.log(firstName, lastName, country, city, age, isMarried)

The above modification would make the code consistent with the code of the repo.

Note that the age variable should be removed from the second example

// Declaring variables with number values
let age = 100             // age in years
const gravity = 9.81      // earth gravity  in m/s2
const boilingPoint = 100  // water boiling point, temperature in oC
const PI = 3.14           // geometrical constant

console.log(gravity, boilingPoint, PI)

Message

Super work bro. I have been working with javascript from 3 months. I have some doubts but. You Cleared that Doubts thanks for your efforts

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.