Giter Site home page Giter Site logo

javascriptnote's Introduction

JavaScript

Coding with Bozlur Rosid Sagor

In this topic I will use to visual stdio code(vs-code). First install node.js and NPM(node package manager) then install vs-code in your system. JavaScript ES6 features is awesome if you learn the ES6 you may easily handel react, VUE, Angular project.

my_bio = () => "A simplest changes make huge difference.";
Install Node on Mac.

First, install Homebrew. /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Then you may follow the command

brew update
brew doctor

Next, add Homebrew’s location to your $PATH in your .bash_profile or .zshrc file.

export PATH="/usr/local/bin:$PATH"
brew install node
npm install -g grunt-cli
Check the node and NPM version both:
npm -v
node -v
Features:
  • ES6 basic

    • Variable data type
    • Map
    • Filter
    • Conditional Statement
  • Special data type

    • Fibonacci
    • Factorial
    • Recursion
    • Stack
    • Queue
    • Link list
    • Binary search
  • Loop

    • For loop
    • While loop
    • Do while loop
  • Function

    • Old function
    • Arrow function
    • Callback function
    • Promise
  • OOP

    • Class
    • Constructor
    • Object
Intro of filter method
arrayObject.filter(callback, contextObject);

The filter() method creates a new array with all the elements that pass the test implemented by the callback() function. Internally, the filter() method iterates over each element of the array and pass each element to the callback function. If the callback function returns true, it includes the element in the return array. The filter() method accepts two named arguments: a callback function and an optional object.

Generator in javascript:
function* counter(value) {
 let step;

 while (true) {
   step = yield ++value;

   if (step) {
     value += step;
   }
 }
}

const generatorFunc = counter(0);
console.log(generatorFunc.next().value);   // 1
console.log(generatorFunc.next().value);   // 2
console.log(generatorFunc.next().value);   // 3
console.log(generatorFunc.next(10).value); // 14
console.log(generatorFunc.next().value);   // 15
console.log(generatorFunc.next(10).value); // 26

javascriptnote's People

Contributors

dependabot[bot] avatar mbrsagor avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

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.