AshM10 / lesson2-demo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cfg-lesson2-demo

  • All resources are from Code First Girls
  • JavaScript MOOC Sprint, Lesson 2

Table of Contents

Agenda

Role of JavaScript

  • JS is the ‘brain’ of a web page
  • Adds action and movement
  • We can use clickable buttons and add functions to them
  • We can add interactivity
  • We can add alerts and pop-ups
  • It has multiple data types

Screen Shot 2022-10-07 at 12 54 26 PM

Introduction to Variables and the Console

Screen Shot 2022-10-07 at 12 54 52 PM

Link: var, let and const for beginners (ES6)

Operators and Operands

Screen Shot 2022-10-07 at 12 57 18 PM

Screen Shot 2022-10-07 at 12 57 36 PM

Screen Shot 2022-10-07 at 1 00 15 PM

Screen Shot 2022-10-07 at 1 00 26 PM

Joining Strings

Screen Shot 2022-10-07 at 12 58 41 PM

JS Console

  • The JS Console is a command line interface in your browser that can execute snippets of code. To access it, do the following:
    • Settings > More tools > Developer Tool Shortcuts:
    • Mac: alt + cmd + i
    • Windows: Ctrl + Shift + i

You can see the JS execution of your website in the console and run your own JS code directly in the console.

If Statements and For Loops

Screen Shot 2022-10-07 at 1 01 07 PM

Screen Shot 2022-10-07 at 1 01 18 PM

Summary

  • JavaScript is the brain of our website
  • We can combine variables using concatenation or interpolation
  • We can use the console to see what JS does behind the scenes
  • We can use operators and operands to run a lot of different types of operations and use them in for loops and if statements

What I've Learned

  • Try to compare a code or a description with day to day life. It makes things easier to understand and explain.

Resources

About


Languages

Language:HTML 55.2%Language:JavaScript 44.8%