JavaScript 1

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

modulo

%. Returns the remainder from a division.

Fat Arrow

() =>

List the arithmetic operators:

+, -, *, /, %

When can a value be falsy:

0, Empty strings like "" or '', null (which represent when there is no value at all) undefined (which represent when a declared variable lacks a value), NaN (Not a Number)

String

Any grouping of characters on your keyboard (letters, numbers, spaces, symbols, etc.) surrounded by single quotes: ' ... ' or double quotes " ... ". Though we prefer single quotes. Some people like to think of string as a fancy word for text.

Number

Any number, including numbers with decimals: 4, 8, 1516, 23.42

.

The dot operator

data type

classifications we give to the different kinds of data that we use in programming

conditional statement

conditional statement checks specific condition(s) and performs a task based on the condition(s)

===

equal to

Console

an object, a collection of data and actions, that we can use in our code.

3 logical operators

and (&&) or (||) and not (bang !)

Parameter of a function

function ==>(this)<== { } . - To allow a function to accept data. provides the information the function needs to perform its job, e.g., how long should the phone vibrate, or how big a circle should be drawn

function declaration syntax

function idOfFunction ( ) { }

>

greater than

>=

greater than or equal to

Object

Collections of related data.

var

JS keyword for variable, creates/declares new variable

<

Less than

What are the seven fundamental data types in Javascript?

Number, String, Boolean, Null, Undefined, Symbol, Object

typeof

Returns the data type value

Undefined

This data type is denoted by the keyword undefined (without quotes). It also represents the absence of a value though it has a different use than null.

Boolean

This data type only has two possible values— either true or false (without quotes).

Null

This data type represents the intentional absence of a value, and is represented by the keyword null (without quotes).

Concatenation

This process of appending one string to another

A single line comment begins with:

Two forward slashes ( // )

Multi-line Comment

Will comment out multiple lines and is denoted with /* to begin the comment, and */ to end the comment. You can also use this syntax to comment something out in the middle of a line of code.

Write a template literal:

` ${} `

Operator

a character that performs a task in our code

Variable

a container for a value

How do we call, or use methods?

ie. 'example string'.methodName()

Write correct 'if' syntax:

if (true or false) { // block statement }

!==

is NOT equal to

<=

less than or equal to

How to start a JS doc:

main.js

/* */

multi-line comment

function

reusable block of code that groups together a sequence of statements to perform a specific task.

ternary operator

shorthand to simplify concise if...else statements.

List 2 types of code comments in JavaScript:

single line comment and multi-line comment

//

start of single line comment

multi-line comment (block comment)

starts with /* and ends with */, where all text between /* and */ is part of the comment

Symbol

unique identifiers, useful in more complex coding

What are the 3 variables?

var, let and const

single line comment

will comment out a single line and is denoted with two forward slashes // preceding it


Set pelajaran terkait

Milady chapter 16 ~ Haircutting.

View Set

Hatchet Vocabulary Chapters 13-16

View Set

Adult Development and Aging Final Exam Review

View Set

Strategic Management- Chapter 4!

View Set