Module 1.5.1: Introduction to JavaScript Language

0.0(0)
Studied by 0 people
call kaiCall Kai
Locked
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/22

flashcard set

Earn XP

Description and Tags

prelim topic

Last updated 1:22 PM on 7/28/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

23 Terms

1
New cards

Javascript

  • Is a client-side scripting language - it is executed in the client (software) that the viewer is using (browser)

  • Each line is processed as it loads in the browser

  • Allows us to make interactive webpages

  • Is dynamic, event-based, async-friendly, prototype based, object-oriented language

  • Is popular because it runs pretty much on very client (iOS, Android, laptops) and on servers (Node.js)

2
New cards

Javascript Statements

  • Are codes to be executed by the browser

  • Tells the browser what to do

  • Commands to the browser

  • add semicolons at the end

  • can be grouped together into blocks using curly brackets

  • try…catch statement allows to test a block of code for errors

3
New cards

//

  • is the javascript single-line comment

4
New cards

/* */

  • Is the javascript multi-line comment

5
New cards

Javascript variables

  • are containers for storing information (ex: x=15; length=60.10;)

  • hold values or expressions

  • can hold a text value in name='“multimedia”

  • var statement can declare javascript variables: var x; var name;

  • They are case sensitive

6
New cards

Variable names

7
New cards

Arithmetic Operators

  • These perform arithmetic operations between values of the variables

  • Ex: Addition (+), Subtraction (-), Multiplication (*), Division (/), Modulus (%), Increment (+ +), Decrement (- -)

8
New cards

Assignment Operators

  • These assign values to variables

  • Ex: =, +, - =, * =, / =, % =

9
New cards

Comparison Operators

  • These determine equality or different between variables or values

  • Ex: Equal to (= =), Exactly equal to (= = =), Not equal (! =), Greater than (>), Less than (<), Greater than or equal to (>=), Lesser than or equal to (<=)

10
New cards

Logical Operators

  • These impose the logic between variables or values

  • Ex: AND (&&), OR (| |), NOT (!)

11
New cards

Conditional Operators

  • These assign value to variable based on some conditions

  • ?:

12
New cards

if statement

  • to execute some code only if specified condition is true

13
New cards

if…else statement

  • to execute some code if the condition is true and another code if the condition is false

14
New cards

if…else if…else statement

  • To select one of many blocks of code to be executed

15
New cards

switch statement

  • To select one of many blocks of code to be executed

16
New cards

Javascript Looping

  • It executes the same block of codes

  • executes a specified number of times

  • execution can be controlled by some control logic

  • Ex: for, while, do…while statements

  • Ex: for…in to iterate through the elements of an array

17
New cards

Break

  • This breaks the loop and follows the code after the loop

18
New cards

Continue

  • This breaks the loop and continues with the next value

19
New cards

Javascript Functions

  • These can be called with the function name

  • Can also be executed by an event

  • Can have parameters and return statement

20
New cards

Javascript Events

  • These are actions that can be detected (Ex: OnMouseOver, onMouseOut)

  • Are normally associated with functions

  • Ex:
    <input type=”text” size=”30” id=”email” onChange=”checkEmail()”>

21
New cards

Alert Box

  • This is a javascript popup box to make sure information comes through the user

22
New cards

Confirm Box

  • This is a javascript popup box to verify or accept something

23
New cards

Prompt Box

  • This is a javascript popup box for the user to input a value before entering a page