GoConqr has a new look! Let us know what you think.

Flashcards

Easy

Kenneth Crabtree JavaScript Beginner English 16 cards

Cards in this deck (16)

  1. 1QuestionAnswer
  2. 2What does 'var' do in JavaScript?'var' declares a variable, which can be globally or function-scoped.
  3. 3How do you create an array in JavaScript?Using square brackets: const arr = [1, 2, 3];
  4. 4What is 'let' used for?'let' declares a block-scoped variable.
  5. 5What does 'const' do?'const' declares a constant, block-scoped variable that cannot be reassigned.
  6. 6How to check if a variable is an array?Using Array.isArray(variable);
  7. 7What does 'map()' do?Creates a new array with the results of calling a function for every element.
  8. 8How do you write an arrow function?const func = () => {};
  9. 9What is 'this' keyword in JavaScript?'this' refers to the context in which a function is called.
  10. 10How do you add an element to the end of an array?Using arr.push(element);
  11. 11How do you remove the first element of an array?Using arr.shift();
  12. 12What does 'typeof' operator do?Returns the type of a variable as a string.
  13. 13What is the difference between '==' and '==='?'==' compares values, while '===' compares both values and types.
  14. 14How do you convert a string to a number?Using Number(str) or parseInt(str).
  15. 15How do you find the length of an array?Using arr.length.
  16. 16What does 'forEach()' do?Executes a function once for each array element.

Information

Description
Beginner JavaScript Flashcards on Easy, created by Kenneth Crabtree on 09/11/2024.
Views
1
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?