Save
Busy. Please wait.
Log in with Clever
or

show password
Forgot Password?

Don't have an account?  Sign up 
Sign up using Clever
or

Username is available taken
show password


Make sure to remember your password. If you forget it there is no way for StudyStack to send you a reset link. You would need to create a new account.
Your email address is only used to allow you to reset your password. See our Privacy Policy and Terms of Service.


Already a StudyStack user? Log In

Reset Password
Enter the associated with your account, and we'll email you a link to reset your password.
focusNode
Didn't know it?
click below
 
Knew it?
click below
Don't Know
Remaining cards (0)
Know
0:00
Embed Code - If you would like this activity on your web page, copy the script below and paste it into your web page.

  Normal Size     Small Size show me how

JS - Week 2

WTWD 310 - JavaScript

TermDefinitionExample
If/Else Statement A control structure that executes a block of code if a specified condition is true. If the condition is false an optional else block can execute. if (age >= 18) { console.log('You are an adult.'); } else { console.log('You are a minor.'); }
Loop A control structure that repeatedly executes a block of code as long as a specified condition is true. Common loops include for while and do...while. for (let i = 0; i < 5; i++) { console.log(i); }
Method A function that is a property of an object. Methods are used to define behaviors of objects. const person = { name: 'John', greet: function() { return 'Hello ' + this.name; } }; console.log(person.greet());
Array A data structure that can hold multiple values at once. Arrays are ordered and indexed starting from zero. let fruits = ['apple', 'banana', 'cherry']; console.log(fruits[0]); // Output: apple
Constructor A special function used to create and initialize objects. Constructors are often used with classes to set initial properties. function Person(name, age) { this.name = name; this.age = age; } let person1 = new Person('Alice', 30); console.log(person1.name); // Output: Alice
Conditional An expression that evaluates to true or false used to determine which code should be executed. Commonly used with if statements. let isAdult = age >= 18; if (isAdult) { console.log('You are an adult.'); }
Switch Statement A control structure that executes one block of code from multiple choices based on the value of an expression. let color = 'red'; switch (color) { case 'red': console.log('Color is red'); break; case 'blue': console.log('Color is blue'); break; default: console.log('Color is not red or blue'); }
Alert() A built-in JavaScript function that displays an alert dialog with a specified message and an OK button. alert('This is an alert message!');
Comparison Operators Operators used to compare two values and return a boolean result (true or false) based on the comparison. These operators are essential for making decisions in the code often used in conditional statements like if else and loops. let a = 10; let b = 5; console.log(a > b); // Output: true console.log(a == b); // Output: false console.log(a !== b); // Output: true
Math Methods Built-in methods of the JavaScript Math object that perform mathematical operations. These methods provide functionalities for common mathematical tasks such as rounding numbers generating random numbers and finding maximum or minimum values. let num = -5; console.log(Math.abs(num)); // Output: 5 let randomNum = Math.random(); console.log(randomNum); // Output: a number between 0 and 1
Logical Operator Operators used to combine or invert boolean values and expressions. The three main logical operators in JavaScript are && (AND) || (OR) and ! (NOT). Logical operators are used to build complex conditional statements by combining multiple conditions. let a = true; let b = false; // AND (&&) operator console.log(a && b); // false // OR (||) operator console.log(a || b); // true // NOT (!) operator console.log(!a); // false
Created by: ProfJordan
Popular Computers sets

 

 



Voices

Use these flashcards to help memorize information. Look at the large card and try to recall what is on the other side. Then click the card to flip it. If you knew the answer, click the green Know box. Otherwise, click the red Don't know box.

When you've placed seven or more cards in the Don't know box, click "retry" to try those cards again.

If you've accidentally put the card in the wrong box, just click on the card to take it out of the box.

You can also use your keyboard to move the cards as follows:

If you are logged in to your account, this website will remember which cards you know and don't know so that they are in the same box the next time you log in.

When you need a break, try one of the other activities listed below the flashcards like Matching, Snowman, or Hungry Bug. Although it may feel like you're playing a game, your brain is still making more connections with the information to help you out.

To see how well you know the information, try the Quiz or Test activity.

Pass complete!
"Know" box contains:
Time elapsed:
Retries:
restart all cards