KEMBAR78
Javascript mynotes | PPTX
5 elements for effective thinking –
Michael Starbird
• 1. Understand Deeply
• 2.Make Mistakes
• 3. Raise Questions
• 4. Follow the Flow of Ideas
• 5. Change
Generate Color Palette
https://mycolor.space/
Color
Generator
https://coolors.co/
Developer
Documentati
on
Developer documentation is meant to
describe every aspect of how developers
should interface with a given software
service or library. When we read
documentation, we are learning how to
use the software's "API".
API
Application Programming Interfaces is the interface that
you used so you can speak to hardware.
Is the part of the server that receives requests and sends
responses.
When you use map on array – map is and api method of
array
Application: These can be apps that you use on your
smartphone or a software program that you use.
Programming: Developers use APIs to write software.
Interface: How you interact with the application.
What is jQuery? “Write Less, Do More.”
Is a collection of pre-written JavaScript code (known as a
JavaScript library) that you can add to your own coding projects.
What is the Main Difference Between JavaScript and
jQuery?
JavaScript is a standalone programming language, while jQuery
is a collection of JavaScript code (not its own language).
Example Javascript Vs jQuery
window.onload = initAll;
function initAll() {
document.getElementById(“submit”).onclick =
submitMessage;
}
function submitMessage() {
var greeting =
document.getElementById(“name”).getAttribute(“valu
e”);
document.getElementById(“headline”).innerHTML =
“Thank you for joining our email list,” + greeting;
return false;
}
$(“#submit”).click(function () {
var greeting = $(“#name”).val();
$(“#headline”).html(“Thank you for joining our email
list, ” + greeting);
return false;
});
Navigating
Documentati
on
• Class Reference: A comprehensive listing of API
functionality.
• Changelog: A reference of what changes in each
API version.
• Code Samples: A set of examples showing typical
API usage.
• Code Playground: An interactive explorer for
trying the API live in the browser.
• Developers Guide: A conversational written guide
to using the API.
• Articles: Tutorials and screencasts discussing
different ways of using the API.
Node.js
Open-source environment for Javascript
Created by Ryan Dahl
Can generate dynamic page content
Can create, open, read, write, delete, and close
files on the server
Can collect form data
Can add, delete, modify data in your database
NPM: The Node Package Manager
A tool that comes by default with every Node.js installation
Package.json file
Includes the packages and
applications it depends on,
information about its
unique source control, and
specific metadata like the
project's name,
description, and author.
It contains a collection of
any given project's
dependencies. These
dependencies are the
modules that the project
relies on to function
properly.
Open Source
READme
A description of the project.
What does it do? What does it
solve?
Installation of the code into
your own, or how to run it on
your computer
Common examples of usage
Comments about how to
contribute. This can be simple
A link to more information,
documentation or support
A list of known bugs, limitations
and/or a To Do list of features.
Although these should also be
issues in the GitHub repo
Optionally, a list of people
using this code inside theirs (in
the case of plugins etc) or top
contributors
If no LICENSE.md, an
indication of the license of the
code (MIT, Apache etc).
Use Choose a License to
determine this Most common
MIT, ISC
Node REPL
REPL stands for Read Eval Print
Loop and it represents a computer
environment like a Windows console
or Unix/Linux shell where a
command is entered and the system
responds with an output in an
interactive mode. Node.js
or Node comes bundled with
a REPL environment.
To launch the REPL (Node shell),
open terminal and type node. It will
change the prompt to > in Windows
and MAC. You can now test pretty
much any Node. Js.
Adding an existing project to GitHub using the command
line
Open Terminal.
Change the current working directory to your local project.
Initialize the local directory as a Git repository.
$ git init
Add the files in your new local repository.
$ git add .
Commit the files that you've staged in your local repository.
$ git commit –m “ “
At the top of your GitHub repository's Quick Setup page, click to copy the remote repository URL
In Terminal, add the URL for the remote repository where your local repository will be pushed.
$ git remote add origin remote repository URL
$ git remote -v # Verifies the new remote URL
Push the changes in your local repository to GitHub.
$ git push -u origin master
.gitignore
file
touch .gitignore (create the gitignore file)
vi .gitignore (vi is a text editor)
git rm --cached .DS_Store (move the
DS_Store file to .gitignore without deleting
it locally but deleting it only from git)
Execute a file with node test (example)
• const data = require('./data')
• Node
• node ( the file you want to test index.js)

Javascript mynotes

  • 1.
    5 elements foreffective thinking – Michael Starbird • 1. Understand Deeply • 2.Make Mistakes • 3. Raise Questions • 4. Follow the Flow of Ideas • 5. Change
  • 2.
  • 3.
  • 4.
    Developer Documentati on Developer documentation ismeant to describe every aspect of how developers should interface with a given software service or library. When we read documentation, we are learning how to use the software's "API".
  • 5.
    API Application Programming Interfacesis the interface that you used so you can speak to hardware. Is the part of the server that receives requests and sends responses. When you use map on array – map is and api method of array Application: These can be apps that you use on your smartphone or a software program that you use. Programming: Developers use APIs to write software. Interface: How you interact with the application.
  • 6.
    What is jQuery?“Write Less, Do More.” Is a collection of pre-written JavaScript code (known as a JavaScript library) that you can add to your own coding projects.
  • 7.
    What is theMain Difference Between JavaScript and jQuery? JavaScript is a standalone programming language, while jQuery is a collection of JavaScript code (not its own language).
  • 8.
    Example Javascript VsjQuery window.onload = initAll; function initAll() { document.getElementById(“submit”).onclick = submitMessage; } function submitMessage() { var greeting = document.getElementById(“name”).getAttribute(“valu e”); document.getElementById(“headline”).innerHTML = “Thank you for joining our email list,” + greeting; return false; } $(“#submit”).click(function () { var greeting = $(“#name”).val(); $(“#headline”).html(“Thank you for joining our email list, ” + greeting); return false; });
  • 9.
    Navigating Documentati on • Class Reference:A comprehensive listing of API functionality. • Changelog: A reference of what changes in each API version. • Code Samples: A set of examples showing typical API usage. • Code Playground: An interactive explorer for trying the API live in the browser. • Developers Guide: A conversational written guide to using the API. • Articles: Tutorials and screencasts discussing different ways of using the API.
  • 10.
    Node.js Open-source environment forJavascript Created by Ryan Dahl Can generate dynamic page content Can create, open, read, write, delete, and close files on the server Can collect form data Can add, delete, modify data in your database
  • 11.
    NPM: The NodePackage Manager A tool that comes by default with every Node.js installation
  • 12.
    Package.json file Includes thepackages and applications it depends on, information about its unique source control, and specific metadata like the project's name, description, and author. It contains a collection of any given project's dependencies. These dependencies are the modules that the project relies on to function properly.
  • 13.
    Open Source READme A descriptionof the project. What does it do? What does it solve? Installation of the code into your own, or how to run it on your computer Common examples of usage Comments about how to contribute. This can be simple A link to more information, documentation or support A list of known bugs, limitations and/or a To Do list of features. Although these should also be issues in the GitHub repo Optionally, a list of people using this code inside theirs (in the case of plugins etc) or top contributors If no LICENSE.md, an indication of the license of the code (MIT, Apache etc). Use Choose a License to determine this Most common MIT, ISC
  • 14.
    Node REPL REPL standsfor Read Eval Print Loop and it represents a computer environment like a Windows console or Unix/Linux shell where a command is entered and the system responds with an output in an interactive mode. Node.js or Node comes bundled with a REPL environment. To launch the REPL (Node shell), open terminal and type node. It will change the prompt to > in Windows and MAC. You can now test pretty much any Node. Js.
  • 15.
    Adding an existingproject to GitHub using the command line Open Terminal. Change the current working directory to your local project. Initialize the local directory as a Git repository. $ git init Add the files in your new local repository. $ git add . Commit the files that you've staged in your local repository. $ git commit –m “ “ At the top of your GitHub repository's Quick Setup page, click to copy the remote repository URL In Terminal, add the URL for the remote repository where your local repository will be pushed. $ git remote add origin remote repository URL $ git remote -v # Verifies the new remote URL Push the changes in your local repository to GitHub. $ git push -u origin master
  • 16.
    .gitignore file touch .gitignore (createthe gitignore file) vi .gitignore (vi is a text editor) git rm --cached .DS_Store (move the DS_Store file to .gitignore without deleting it locally but deleting it only from git)
  • 17.
    Execute a filewith node test (example) • const data = require('./data') • Node • node ( the file you want to test index.js)