Java Script Course

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

FACTORY

"Factory" is an object-oriented programming term that means "an object that creates other objects." aka constructor

VARIABLE HOISTING

"Hoist" literally means to "raise" or "lift up." "Variable hoisting" refers to the fact that variables can be used before they are declared - or stated another way: you can declare a variable after it has been utilized. EXAMPLE : X = 5; <-- Just a Statement console.log(X); var = 10; < -- Declaring a variable - We used X and then declared X as a variable (note: X = 5 is not a declaration, it is a statement). - In JavaScript, hoisting refers to the fact that declarations are moved to the top of the current scope (for example: declarations within a function are automatically run as though they're at the top of the function). - In our earlier example, the declaration is var X, not = 10. Only the declaration is hoisted. - An ignorance of hoisting can lead to bugs. It's safest to simply declare variables at the beginning (top) of their respective scope because they'll be "moved to the top" during execution anyways.

IF STATEMENTS

"If statements" are a type of conditional statement that specifies that a section of code is to be executed if a condition is true.

implicit vs explicit

"Implicit" refers to actions built into a programming language that refer behind the scenes. It is action automatically taken by a language. "explicit" (clear; detailed). In coding, "explicit" refers to actions specified by the developer. * the image will show an example - This will return 333. JavaScript implicitly converted these numbers into a string data type (even though that wasn't specified for every number) and concatenated the string.*

RUNTIME LIBRARY

"Runtime" describes software or instructions that are executed while your program is running. A "runtime library" is a special program library used by a compiler to implement functions built into a programming language during the runtime (execution) of a computer program. - JavaScript requires a runtime library, but fortunately the JavaScript runtime library comes preinstalled on most browsers

SYNTACTIC SUGAR

"Syntactic sugar" refers to syntax of a programming language that is easier to read or write. It is called this because it makes the coding language "sweeter" in terms of clarity, styling and conciseness. For example, in one programming language, the following codes both produce the same outcome (moving an item): MOVE X Y MOVE X TO Y Because the second example is clearer to understand (X is moved to Y), it is considered syntactic sugar.

INCREMENT AND DECREMENT OPERATORS

"To increment" means to increase. The increment operator in JavaScript is written as ++ and counts one step up. "Decrement" means to "decrease or reduce." In computing, it means "to reduce by discrete (individually separate) amounts." It is written as -- *Note : check the image for the correct syntax - when incrementing/decrementing, make sure not to increment/decrement for the final value or else it wont work

UNARY OPERATOR

"Unary" means "having, made up of, or acting on one component, item or element." An "operand" is the number that is being dealt with in a mathematical operation. It is not the action being taken with the number, it is the number itself. EXAMPLE: In 5+6, the operands are 5 and 6. The "+" is the operator. - A "unary operator" is an operation that only contains a single operand. An example of this would be + 5. - A "binary operator" is an operation that requires two operands - one operand before the operator and one after. An example of this would be 5 + 5. - There is a unary operator called a "negation operator." This returns the opposite or negative form of something.

VANILLA JAVASCRIPT

"Vanilla" means "having no special or extra features; ordinary or standard." Vanilla JavaScript refers to plain JavaScript. It's used to specify that we are not talking about a JavaScript library or framework.

SCOPES

*Look at the Image for more details* - Global scope: The variable "A" would be able to be accessed from anywhere in the program. - Function scope: The variable "B" would only be able to be accessed from within the function - not outside. - Block scope: The variables "C" and "D" could only be accessed within the if statement. For example: if you attempted to perform an operation on the variables C and D outside of the if statement's curly brackets, it wouldn't execute.

The Five Key Elements of a Program

1. Entrance (start to the program - first instruction) 2. Control/branching (decision points and logic) 3. Variables (data used to keep track of values that can change) 4. Sub Program (repeatable small programs within a program) 5. Exit (the specified end of the program)

Types of Local Scope

1. Function Scope - refers to variables that are only available within the function they were created in. 2. Block Scope - A block is a set of opening and closing curly brackets. Typically block scope refers to conditional statements and loops. Difference : The difference between function scope and block scope is that in function scope, any variable declared within a function is visible anywhere within that same function but with block scope, the visibility of variables is confined to a given block enclosed by curly braces - you can have multiple sets of opening and closing curly brackets within a function.

The many terms for subprogram

1. Functions - a function is a repeatable block of code that executes certain actions and performs tasks. You execute a function by calling it. 2. Methods -a method is a set of code associated with an object that is designed to change the state of that object when it executes. 3. Routines 4. Subroutines 5. Subprograms 6. Procedures

The 6 primitive data type :

1. String, 2. Number, 3. Boolean, 4. Null 5. Symbol 6. Undefined - One of the key traits of a primitive data type is that it cannot be simplified any further. A primitive data type is a predefined type of data that is built into the language.

The 7 Types of Values in JavaScript :

1. Strings (data that represent text or a series of text) 2. Numbers 3. Symbols 4. Booleans (true or false statements) 5. Objects (things with state and behavior) 6. Functions (a block of organized, reusable computer code used to perform a single, related action - also called a subprogram or subroutine) 7. Values that are undefined

API CALLS

1. an Application Program Interface is a collection of methods that allow different programs to communicate with each other. 2. a "call" is when a main program temporarily transfers control of the computer to a subprogram. "API call" is when your code runs code within an API.

FOR LOOPS

A "For Loop" is used to repeat a section of code a number of times. For Loops are used when the number of iterations are known. - The for loop repeatedly executes instructions as long as a particular condition is true.

Constructor

A "constructor" is a special part of a class (a template for defining an object [item with state and behavior]). The constructor is a special part of the class that describes the default state of any new instance of the class that gets created. In other words, it gives default values for the properties of the class. - A constructor is a subprogram (method) with the parameters. You could sets value within the subprogram or/and use the parameters to set the values for the object it is currently in

Libraries vs Frameworks

A library is a collection of pre-made resources used to create computer programs. Most often, these take the form of a package of code with built-in functions that all relate to a specific area. They are usually used by adding them to a software project already being created, and then having code in that project make use of the various functions in the library. A framework is similar in nature to a library, in that it is made up of pre-made resources, which are usually computer code. The framework is usually a fully-functioning system that provides a complete set of generic functionality as is, and it can be modified by the programmer to fit their needs. **The difference could be summarized this way: a library is code that can be called by another, primary program. A framework is itself a working program that can call other code.**

IDENTIFIERS AND LITERALS

A literal is the data exactly as it is meant to be processed. Whereas an identifier is a name, the literal is the value itself. EXAMPLE : let x = 10; 10 is the literal and X is the identifier

NPM (Node Package Manager)

A package manager is a collection of software that automates the installation process - including upgrading, configuring, deleting unneeded programs. NPM is a package manager for JavaScript. Yarn is another popular JavaScript package manager.

Scripting Language

A scripting language is a computer language used to make scripts. Often the tasks these scripts accomplish are valuable to automate, so that the task steps don't have to be entered into the computer again every time you want to do those tasks.

TOKENS

A token is a single component in a programming language. The five categories of tokens are: 1. Constants, 2. Identifiers (names that uniquely identify a program element in the code - such as variables), 3. Operators (such as +, * or -), 4. Separators (also called "delimiters" - a sequence of one or more characters that specifies the boundaries of sections of code), 5. Reserved words (words that have set meanings and uses, and cannot be redefined by a developer). - Sometimes in Dev Tools, if there's an error in your code, it may state: Unexpected token - which means there's a component in your code the browser can't execute.

While Loop

A while loop is basically a repeating "if statement." Meaning, you are telling the computer to execute certain code repeatedly while a particular condition is present.

ASP.NET ( Active Server Pages dot (.) NET )

ASP.NET is a framework for making complex websites. - ASP.NET is simply a set of tools offered by Microsoft used when making websites. ASP.NET allows one to develop complicated websites that contain large amounts of data and sections. It is considered an advanced tool for those interested in making websites and web pages. - The term "ASP.NET" uses the letters "ASP," but ASP.NET has very little to do with ASP. The creators of ASP.NET used the "ASP" acronym basically as a marketing element when they released ASP.NET. ** One such method was Active Server Pages (ASP). This was a way to combine the standard language of web pages (HTML) with specific computer code that would create web page content on the fly, as needed. It was quite popular in the late 1990s and early 2000s.**

ABSTRACT DATA

Abstract data refers to data where we are only concerned with it in terms of its items and operations - not the implementation. In other words, we only care about what it's supposed to do - not about how it does it. - Abstraction is a general idea about a type of situation, thing, or person rather than a specific example from real life. In coding, abstraction is the hiding away of the implementation details, and only providing the description of the behavior to be performed. - EXAMPLE : An automatic coffee dispenser machine will simply have a button that says, "Make Coffee." It doesn't display data on how exactly it is done and you don't necessarily need to know what functions the machine performs - you just know the expected behavior. This is abstraction.

EVENT TRIGGER

An "event trigger" is something that indicates that an event (an action external to the program) has taken place. When an event is triggered (i.e. the event has occurred and been noted), this typically sets off (triggers) a particular action. Let's say a user clicks the save button - this click is an event that triggers information being sent to the database. Therefore, it is an "event trigger." Or if a user inputs text in a form and presses enter, they have "triggered an event."

XML PARSER

An XML parser reads XML and makes it possible for the XML to be used by programs and websites. Browsers have XML parsers built into them. - Before accessing an XML document, the document has to be loaded into an object within the XML DOM. XML has its own DOM that defines the properties (characteristics) and methods (actions) related to accessing and editing XML. Terms : 1. "new" - A operator that is used to create an object. 2. "parseFromString" - method creates an XML object from a string. 3. "DOMParser" - is used to create a DOM object from an XML string. 4. "childNodes" - property returns a specified child node by index number. 5. "getElementsByTagName()" method returns a collection of elements using a tag name. Thats what you need to create a new tag...

Arguments vs Parameters

Arguments are the actual data passed to a subprogram when it is called EXAMPLE : subprogram AddTwo(x, y) { return x + y } - in the subprogram AddTwo, X and Y are the arguments for that subprogram Parameters are

FLOATING POINT

As a refresher, a floating point is a specific way of representing large numbers. Instead of writing out the entire number, you can write the first part of it and then a factor to multiply it by. When you do this, you move the decimal point in the number; hence the name "floating point." EXAMPLE : Take the number three thousand, four hundred twenty-five. Written normally, it would be: 3425; written in floating point notation (a system for writing symbols), it could be: 3.425 x 103. Since 103 is 1000, "3.425 x 103" means "3.425 times 1000," or 3425.

HTML OBJECTS WITH THE DOM

As far as the DOM is concerned, all of the elements in this image are objects. All elements are objects. They are objects because properties and methods can be used with them. - Here is a great resource that lists out all of the properties/methods that can be used on HTML elements: https://www.w3schools.com/jsref/dom_obj_document.asp

INITIALIZATION AND DECLARATIONS

As you know, variables are declared as follows: var name Variable declarations are typically followed by: = value But the = value is not a declaration. It is an initialization. Initialization means "the assignment of a value." Technically, you can declare a variable with just the var statement - you don't have to have an initialization. But it is best practice to include an initialization with your variable declarations.

BUSINESS LOGIC

At a high-level, "business logic" is another word for "code." Technically, business logic is the code that manages communication between a user interface and a database. It is the part of the program that describes how data can be created, stored, changed, and deleted.

DJANGO

Django is a free and open-source Python web framework that can be used to create complex websites. It is covered on The Tech Academy's Python Course. EXAMPLE: Youtube utilized Django in the creation of their website.

EMBER

Ember.js is an open-source, JavaScript web framework that allows developers to create dynamic web applications. EXAMPLE: Many major companies have utilized Ember within their organizations, including: Microsoft and Netflix.

EXPRESS

Express is short for Express.js. - Express is a web application framework that is free and open-source. It is used mainly to build web applications and APIs. It is commonly used with servers. EXAMPLE: PayPal used Express.js in the creation of their app.

Not a number (NaN)

In JavaScript, there are 3 unique values that are considered to be numbers, but actually do not act in the same way. They are: 1. NaN (short for "Not a Number") 2. Infinity (positive infinity) 3. -Infinity (negative infinity)

How it works : React

In React, elements (like <p> or <h1>) are referred to as "components." components are JavaScript functions or classes that can accept input. Inputs are referred to as properties. React abbreviates properties as "props." React uses a listener function to monitor changes within components. React makes changes in the virtual DOM whenever a change is observed in the DOM. In React, the full cycle runs like this: 1. An event is triggered for a component. 2. The React listener notes the event for the component. 3. The component is marked "dirty." 4. A batch update detects the dirty component. 5. The virtual DOM is re-rendered in full to reflect the state of the dirty component. 6. A diff is run between the virtual DOM and the DOM and any differences that exist are noted. 7. The relevant section(s) in the DOM are updated to reflect all noted differences. NOTE: as part of this process, the children of components are automatically updated, whether or not there are changes in them. 8. The actual web page is changed to reflect the new DOM.

What you can do with it : XML (Extensible Markup Language)

In XML, developers create their own document structure, and then use XML to specify markup instructions for the data in those documents. For an example: in XML, you create your own tags. In fact, there are no pre-defined tags in XML - they are invented by the author. XML can be used to store and transport data. (ajax) By itself, XML does nothing. There must be software that sends, receives, stores and displays XML, because XML doesn't include any information about how to display content, it is commonly used in conjunction with HTML. In this case, the XML stores and transports the data, while the HTML is used to handle the format and display of data.

VDOM (VIRTUAL DOM) *React*

In react "copies" of DOM objects are made in the memory of your computer. These are called Virtual DOM (abbreviated VDOM) objects. - VDOM objects are considered "lightweight" copies, meaning they load faster than DOM objects because they can't actually affect what's displayed on the user's screen To assist with understanding the process on how the VDOM and DOM interact, here is the basic process diagrammed: 1. When there is a change in the data, the VDOM tree is re-rendered. Even if only one small change occurred, the entire VDOM is built - this occurs much faster than it takes to re-render the DOM. 2. React compares a snapshot of the previous VDOM with the current VDOM (the one with the changes). This comparison (looking at the differences between the new Virtual DOM and the pre-update version) determines which VDOM objects have changed. - This process is referred to as "diffing." "Diff" means "to compare things (usually files) in order to figure out whether or not they are different - The data found to be different is referred to as "dirty." "Dirty" means "data that has been changed but not yet re-rendered in the DOM." 3. Based on the new changes found in the VDOM, the DOM is updated. The entire DOM isn't re-rendered, only the changes are. To summarize: the VDOM increases the speed at which the DOM can be rendered, thereby increasing the speed of rendering webpages in general.

NODES AND THE DOM

In the DOM, every item within an HTML document is a node. - This means: every element is a node (an element node), text inside elements are nodes (text nodes) and comments are nodes (comment nodes). Even the document itself is considered a node (document node). - These nodes have object-oriented relationships (i.e. parent and child). In the Image : The <head> and <body> elements are the first child nodes of the <html> node and the <title>, <h1> and <a> elements are the last child nodes. The childNodes[indexnumber] property can be used to navigate child nodes. For example: childNodes[0] could be used to access the <h1> element when used in relation to the <body> element.

REACT

It is a JavaScript library mainly used for building user interfaces. - It was created by developers at Facebook and is currently maintained by Facebook and a community of developers and other companies. - React lends itself to single-page or mobile applications, as it is optimal for rapidly fetching and changing data. In React, "render" is used to mean "the process of transforming components into DOM nodes." The purpose of the rendering is to ensure that components are passed to the browser in the way a browser understands

VUE

It is an open-source JavaScript framework that, like React, is mainly used for building user interfaces and single-page applications. Vue was created by a developer named Evan You after working for Google.

JSON.STRINGIFY( )

JSON ( JavaScript Object Notation) JSON is a way to represent a specific object, using the JavaScript language. This can be useful in exchanging data between different computers or computer programs. In fact, JSON is what is known as a "data-interchange format" - a method of formatting data in a manner that is easily exchanged between different computers. This is done by using JavaScript language instructions, in a specific format, to describe the various characteristics of the object that is to be exchanged. The JSON.stringify() method takes JavaScript objects and converts them to JSON strings. For data to be stored to a web server it needs to be serialized (converted into a string). In other words, the data needs to be converted from an object to a string format. Output for the image : {"name" : "Dax","breed":"Great Pyrenees","color":"White"}

JavaScript XML (JSX)

JSX adds XML and HTML syntax to JavaScript, allowing you to utilize them all together. JSX can utilize tags and is able to be used with React to change and create the User Interface. It converts HTML and XML tags into React components. - As a note: using JSX is not required when writing code in React, but it can make the process easier - JSX is a sort of syntactic sugar for React. JSX LINK : src = "https://unpkg.com/[email protected]/babel.min.js"

MVC (Model - View - Controller)

MVC (Model - View - Controller) is a pattern of organization for a computer program. It is designed to divide a computer program into three interconnected parts. These parts provide separation between the three common elements in computer programs, so that the program can be modified easily over time. These three elements are referred to as "concerns" - as in, areas that the program concerns itself with. They are: 1. Presenting data to the user (VIEW) - is a set of code that takes in needed information and then renders a user interface to display that information - Most views in MCS frameworks use templates - files made of pre-made HTML and placeholders for the dynamic data to be inserted 2. Managing the data, logic and rules of the program (MODEL) - The "Model" part of an MVC application is where state of the data is obtained. EXAMPLE : The use is active or inactive; A student has a GPA of 3.52 etc. 3. Taking in user input and passing commands to the MODEL and the VIEW based on that user input (CONTROLLER) - A Controller is computer code that handles interactions, updates the Model to reflect changes in state then passes information to the View - This model helps developers make changes overtime because you would only have to make the change in one section instead of all of them. - The MVC pattern is very popular, and is used in several different types of programs. Many MVC frameworks exist, for a variety of types of programs. The programmer would start with the framework and then add to the programs in the framework to customize the overall program for their needs.

DICTIONARIES i.e. (objects)

Most programming languages include dictionaries. A "dictionary" is "a key-value pair collection." - As we've covered, key-value pair is abbreviated "KVP." A KVP are sets of two linked data items that consists of: a key (a unique identifier for some item of data), and the value (the data that is identified by the key). The key is the unique name, and the value is the content. EXAMPLE : let Animal = { species : "dog", color : "brown", breed : "pitbull", age : 5, }

WHERE TO PLACE THE SCRIPT TAG IN AN HTML FILE?

One place to place your script tag is at the end of the body tag, this is mainly because if you have a complicated or large JS file, the HTML script might take longer to render the page, so by place the script tag at the end lets the HTML file render then the JS script could be parse.

Type of Operators

Operators : >=, ==, and != - are used to compare values Arithmetic Operators : +, -, /, *, and % - are used to perform math functions Logical Operators : "and ( && )," "or ( || )," and "not ( ! )" - are used to evaluate whether an expression is true or false Assignment Operator : "=" - it is used to assign a value to a variable.

JQUERY SYNTAX

Our jQuery code is written similarly, yet differently, than our JavaScript code. Here is an example: Note - the $ is the same as typing jQuery( ) when using jquery

PID (Process IDentifier)

PID refers to the number assigned to a process by the operating system. The PID uniquely identifies each process that is running on the system. EXAMPLE : PID 1 is typically the initialization process responsible for starting and shutting down the system.

JavaScript interpreter AKA engines

Some of the most popular JavaScript engines are: V8 (Google Chrome) SpiderMonkey (Firefox) JavaScriptCore (Safari) Chakra (Microsoft Edge)

SPRING

Spring is a popular application framework for the programming language Java. It can be used to build web applications. EXAMPLE: Spring is heavily used in the enterprise (related to a company or business) sector to build major programs and web applications.

STATEMENTS

Statements are computer instructions. These are the instructions that are used by people as they create computer programs. The simplest of these might be things like "print," "delete," "add," "multiply," etc.

SQL (Structured Query Language)

Structured Query Language (SQL) is a language used to monitor and operate databases. SQL can be used to create and modify databases; as well, it can be used to edit, change, modify, and delete, etc. the data in databases. - Usually, the data in a database is organized into tables. Tables are a data structure made up of rows and columns. Each column would represent a type of data that could be stored in the table; each row would represent one entry into the table. - In coding, a query is a way to ask a database to bring up specific data from the full set of data in the database. For instance : if you had a database that contained records of all the sales of a large company, you might write a query that gathered the total dollar amount of sales for each quarter of the last year, organized by product line.

TERNARY OPERATORS

Ternary means "made up of three parts." A ternary operator operates on three values. It can be used to assign a value to a variable based on a condition. This is also referred to as a conditional operator in that it assigns a value to a variable based on a condition. The syntax of this is: Name_of_variable = (condition) ? Value_1 : Value_2

ELSE IF STATEMENTS

The "else if" statement follows an "if" statement and is executed if the "if" statement is found to be false. It will also check if the condition is true in order to execute the statement.

ASYNC ATTRIBUTE

The async attribute tells the browser that it can continue parsing the HTML document while the script file is being downloaded asynchronously. Meaning, the script is downloaded while the HTML continues to be parsed. As soon as the script is downloaded, the HTML parsing is paused and the script is executed. - *Note : the script files would be loaded and executed as soon as they were ready. This could mean that if there are two files whichever one is loaded first that one will execute first. *Note : This attribute should only be use with an external JS file. also document.write( ) method will not work if you use this attribute

ELSE STATEMENTS

The else statement specifies a block of code that will be executed if the condition is false (opposite of the if statement).

JSON.PARSE( )

The exact opposite of JSON.stringify() is the JSON.parse() method. Meaning, it takes a JSON string and converts it to a JavaScript object. When the data is requested, it is then reverted from a string format back to an object on the webpage. Output for the image : Dax the Great Pyrenees

LET KEYWORD

The let keyword declares variables that can have block scope. As a reminder, this refers to blocks of code contained within curly brackets - commonly loops. - The let keyword is very similar to var because they both declare variables. - Variables declared outside of a function with var or let have global scope. - Variables declared within a function with var or let have function scope. - But, variables written within curly brackets using var do not have block scope - meaning, they can be accessed from outside the block of code. Whereas, again, the let keyword cannot be accessed outside of the block. - Whereas var can have function or global scope, let and const can have function, global or block scope. *Look at the image for an example

CONST KEYWORD

The name const is slightly misleading because it doesn't technically create a "constant" (something immutable). Basically, the value assigned by the const keyword is not immutable (it can change) - yet, the variable identifier cannot be reassigned. Whereas var contains information that is expected to change, const contains information which will never change. - Additionally, a constant cannot share its name with a function or a variable in the same scope.

SCOPE

The scope is the functions, variables, and objects you have access to. Scope can be limited. Variables have scope in that they can either be accessed by one, more than one, or all functions in a program. The scope of variables is either "local" or "global." - In JavaScript, a global variable can be accessed from any function within the program, whereas a local variable is only accessed by the function it is assigned to. - Global variables are declared outside of functions, and local variables are declared inside of functions.

SWITCH STATEMENT

The switch statement performs different actions based on the conditions presented to it. It is a type of conditional statement. - Inside switch statements are cases. These cases are the various conditions that are evaluated. - If there is no case match, the default keyword is used to specify what code to run. You can only utilize one default keyword per switch. It is considered a best practice to include it in your switch statements but it is not required. Syntax : switch ( input ) { case ( word ) : output; break; default : ( Words ) }

AJAX CALL

There are five different request states in AJAX: 1. The request is not initialized 2. The request has been set up 3. The request has been sent 4. The request is in process 5. The request is complete

INFINITY/ -INFINTY

To display "infinity" (higher than our maximum floating point number) we would write any number larger than 1.7976931348623157E308 To display -Infinity, we would write any negative number that is -1.7976931348623157E308 or lower

REFERENCING JQUERY

To utilize jQuery, we have to tell the browser we want to do so. That way the browser can know to pull code from the JavaScript library (jQuery). - We reference jQuery by including the following code within our HTML file: src = "http://code.jquery.com/jquery-latest.min.js" Another way to reference the jQuery library is by linking it so the user's browser runs it as follows: src = "//ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js" This is an API built by Google that runs jQuery through their Chrome browser.

TODO APP

Todo apps are often used in tutorials for learning new computer programming languages or associated technologies. This is because they let you use all five of the fundamental elements of a computer program: 1. Entrance Point, 2. Variables, 3. Control and Branching Statements, 4. Subprograms, and 5. Exit Point.

Typed Languages vs. Untyped Languages

Typed Languages - specifying what the data type of the variable is EXAMPLE : int num1 = 24; Untyped Languages - are programming languages that do not make you define what type a variable is. Instead, the computer uses a predefined system to work out what data type a variable is based on its value and how it is being used.

UNPKG

Unpkg is the name of a content delivery network that specializes in npm. It can be used to load files from packages using URLs.

Is Javascript a Typed Languages or a Un-typed Languages?

Untyped Language

VISUAL BASIC

Visual Basic is a popular programming language developed by Microsoft. It was derived from the BASIC programming language and so shares some similarities. It can perform a wide array of actions, from developing graphical user interfaces (GUIs) to accessing databases.

Compiler vs. Interpreter

What are they ? - Both of these software translate high-level languages (computer code that is similar to the english language) and converts them into 1's and 0's - One important aspect of how a compiler works is that it takes all of the instructions in the program and turns them all into language the computer can understand before actually executing the program. - The interpreter work a little different. Each instruction is converted and executed one at a time

How it works : XML (Extensible Markup Language)

XML is a markup language that allows you to create you own tags. You would need to set a definition to each tag to let other computer know what that tag is meant for. - EXAMPLE: If you were creating a book that contained information on automobile parts for sale, you might create a standardized structure for the parts data that would be printed on the page: the part name and part number, a description of the part, the part's weight and selling price, etc. All that data would be represented in an XML definition. - if you wanted to change any information for a specific part, you would only need to change the XML document, and then the book would change to reflect the new data specified in the XML.

Is JavaScript a scripting language?

Yes

HTML DATA ATTRIBUTES

You can add customized data to a webpage using the data attribute. - It is used like this: data-attribute_name = "attribute_value" - A custom data attribute's name starts with the prefix 'data-', the rest of the name should not contain any capital letters. The value is a string.

RUNNING REACT FROM THE COMMAND LINE

You can also run React from the Command Line but first, you must ensure you have the latest version of Node.js installed because it utilizes that. React is run from the Command Line by typing the following commands NOTE : you will write this code in an upcoming step : $ npx create-react-app my-app $ cd my-app $ npm start

Assign Multiple Variables in One Statement

You can assign multiple variables in one statement using a comma in between them.

ARRAYS

an array is a collection of data, arranged in rows and columns. - It is a group of related things that are stored together in a sequence. In coding, arrays are used to organize items in a logical way. They can be quite simple, or quite complex. - Each element has two properties: its index and its value. - The index for an array starts at 0 - Arrays are objects and, so, are included in the object data type. Arrays are a special type of objects.

ARROW FUNCTION

an arrow function is used for writing concise (giving a lot of information clearly and in a few words) functions. - Using the arrow function, we can take this from three lines of code to one. The arrow function allows you to take out the keyword "function." It also lets you use only the parentheses, removing the need for curly braces. For More Info. : https://www.w3schools.com/js/js_arrow_function.asp

EXPRESSIONS

an expression is a combination of values that are computed by the computer. - For example: Name = "What the person types in the name box" could be an expression. Also, x + 5 is an expression.

VS Code : Terminal Basics and Command Line Interface

https://code.visualstudio.com/docs/terminal/basics https://code.visualstudio.com/docs/editor/command-line

All the reserve words in JavaScript

https://www.w3schools.com/js/js_reserved.asp

TYPE COERCION

in JavaScript is when the operands of an operator are different data types (such as "string" and "number" - like: "five" + 5). One is force to change so both are the same data type. In this case the number 5 will become a string

Is Javascript a compiled or interpreted language?

interpreted

JQUERY

jQuery is a library of pre-made JavaScript instructions that help computer programmers to create websites. - jQuery is JavaScript however, jQuery has some of its own unique syntax. - The jQuery library is literally a file containing a massive amount of JavaScript code. Many useful prebuilt methods, functions and more can be pulled from this file to automate coding.

LOCALSTORAGE( )

localStorage() is a JavaScript method that will store data locally in the web browser, without the need for utilizing a separate database. The data will persist in the browser's memory and the data will not be deleted even if the web browser has been closed. Local storage doesn't get sent back and forth with every HTTP request and so it speeds up webpage load time. The localStorage object allows you to save key/value pairs in the browser.


Set pelajaran terkait

Ch05 module review of anatomy and physiology by Math Your Way

View Set

CH 13 Information Security Standards

View Set

Geography Unit Guide 4: Latin America

View Set

Unit 4: Ionic & Covalent Bonding

View Set