Code Monkey home page Code Monkey logo

vanillajs-fullreview's Introduction

                    # JS review

    Js fundamentals part 1
  1. what is js .high level language- dont have to think complex detail its easy to use and to understand .object oriented- based on objects storing most kind of data .multi paradigm- versatile we can use differnt styles of programming

  2. node js- can run js with out using browser called runtime enviroment

  3. js releases the old JS ----> ES5 modern JS starts from JS ES6---> ES14

  4. ES means ECMA Script ECMA is a standard for scripting language

  5. values and variables value with out declaring a variable

    .varibale names cant start with numbers let 4month X .symbols arent allowed either except $ and _ .dont start varibales in capital letter not illegal but... .varaibales must make meaning dont just give random name easy to read

  6. data type
    two type of values

    1. object
    2. primitive value

    primitive value

    1. numbers- include decimal integer float its same for all

    2. string -for characters

    3. boolean- true or false

    4. undefined- not yet defined let childern;

    5. null- empty

    6. symbol(ES2015)- unique and cant be changed

    7. bigint(ES2020)-large integers than the number type can hold

    js has dynamic typing-- we dont have to manually define data type instead it is stored automatically

  7. declaring variables

    let const and var

    var is the oldest in ES6

    let have similarities with var let can change values after assigning them and we can unidentify the value of the varibale

    const is the opp of let cant change values and can assign unknown value for variable.

  8. math operators

    "* **" Exponent < > <= >= * / - + %

  9. operator precedence- important operator find on MDN

  10. string and template literals we use template literals to connect strings ${vaiable}

    \n new line \n\ multiple line multiline

  11. if else statement

  12. type conversion and type coercion

    type coercion is when the js automatically conversts the type( hidden from as) type conversion is when we change the type manually

  13. truthy and falsy

falsy values 0, '', undefined,null,NaN

  1. equality operator

=== strict equlity type coercison cant occur == loose equality type coercion can happen int and str might be equal

  1. prompt to input value we can add Number or String to specify the input value

  2. boolean logic and, or, not && and || or ! not

  3. switch statement switch and case statement this has same function as if else

  4. statement and expressions

expression is code can express value statement is cant express value and template literal insert exprssion not statements

  1. the conditional(ternary) operator same us if and switch but less lines we can use it in template literal

Alt text Alt text

 Js fundamentals part 2
  1. activating strict mode

    will treat errors more strictly

  2. functions 1.declaration 2.expression 3.arrow(Concise Body Arrow Functions) -----Functions that take only a single parameter do not need that parameter to be enclosed in parentheses. However, if a function takes zero or multiple parameters, parentheses are required. Alt text ------A function body composed of a single-line block does not need curly braces. Without the curly braces, whatever that line evaluates will be automatically returned. The contents of the block should immediately follow the arrow => and the return keyword can be removed. This is referred to as implicit return. Alt text

  3. scope Scope defines where variables can be accessed or referenced. While some variables can be accessed from anywhere within a program, other variables may only be available in a specific context.

  4. arrays push unshift ,,, pop shift

  5. objects

assigning value for arrays of data similar to array

any funtion that is attached to a object is called Method

"this" keyword in javascript refers to an object when we are using it in method

  1. Break and continue

The break statement "jumps out" of a loop.

The continue statement "jumps over" one iteration in the loop.

  1. loop backward i-- forward i++

  2. while loop

    devloper skills

  3. prettier

  4. vs snippet

  5. debugging

  6. using extensions

  7. using console and breaking points

  8. JS runtime such as node js

  9. using stackoverflow and mdn

            what is DOM and what is DOM manipulation?
    

16.the DOM is used to represent a web page as a tree of objects. Each node in the tree represents an element on the page, such as a heading, a paragraph, or an image. You can use the DOM to manipulate the page's content, style, and behavior.

adding event listeners dom manipulations

DRY-----dont repeat your self principle

refactoring is to fix duplicated codes

vanillajs-fullreview's People

Contributors

nathanaeltamirat avatar

Stargazers

 avatar

Watchers

 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.