GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Karteikarten

Easy

Kenneth Crabtree JavaScript Beginner Englisch 16 Karten

Karten in diesem Stapel (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.

Informationen

Beschreibung
Beginner JavaScript Karteikarten am Easy, erstellt von Kenneth Crabtree am 09/11/2024.
Erstellt von
Kenneth Crabtree
Aufrufe
1
Bewertung

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck