We want to declare a distance constant and initialize it with the value 120. What should such a declaration look like?

  • Post author:
  • Post category:Blog
  • Post comments:0 Comments
  • Post last modified:June 12, 2024
  • Reading time:1 mins read

We want to declare a distance constant and initialize it with the value 120. What should such a declaration look like? const distance = 120; const distance; distance = 120;…

Continue ReadingWe want to declare a distance constant and initialize it with the value 120. What should such a declaration look like?

We perform the operation: let x = “abcdefg”.slice(2, 4). As a result, the value:

  • Post author:
  • Post category:Blog
  • Post comments:0 Comments
  • Post last modified:June 12, 2024
  • Reading time:2 mins read

We perform the operation: let x = "abcdefg".slice(2, 4). As a result, the value: "ab" will be written to the variable x "cd" will be written to  the variable x "cdef"…

Continue ReadingWe perform the operation: let x = “abcdefg”.slice(2, 4). As a result, the value:

We have declared an array of animals let animals = [“dog”, “cat”, “hamster”];. Then we call the method animals.push(“canary”);. As a result, the animals array will look like this:

  • Post author:
  • Post category:Blog
  • Post comments:0 Comments
  • Post last modified:June 12, 2024
  • Reading time:2 mins read

We have declared an array of animals let animals = ["dog", "cat", "hamster"];. Then we call the method animals.push("canary");. As a result, the animals array will look like this: ["dog",…

Continue ReadingWe have declared an array of animals let animals = [“dog”, “cat”, “hamster”];. Then we call the method animals.push(“canary”);. As a result, the animals array will look like this:

We want to convert the string “1024” to type Number and store the result in variable n. Point out the correct statement

  • Post author:
  • Post category:Blog
  • Post comments:0 Comments
  • Post last modified:June 12, 2024
  • Reading time:2 mins read

We want to convert the string "1024" to type Number and store the result in variable n. Point out the correct statement let n = Number("1024"); let n = String("1024"); let n = StringToNumber("1024"); let…

Continue ReadingWe want to convert the string “1024” to type Number and store the result in variable n. Point out the correct statement

Analyze the code snippet: After declaring a counter variable, we want to put a short comment with information about what the variable is used for. To do this, we modify the line declaration to the form:

  • Post author:
  • Post category:Blog
  • Post comments:0 Comments
  • Post last modified:June 12, 2024
  • Reading time:2 mins read

Analyze the code snippet: let counter = 0; let userName = "John"; After declaring a counter variable, we want to put a short comment with information about what the variable is…

Continue ReadingAnalyze the code snippet: After declaring a counter variable, we want to put a short comment with information about what the variable is used for. To do this, we modify the line declaration to the form:

The msg variable contains a String type value. Information about the number of characters of this string can be obtained using:

  • Post author:
  • Post category:Blog
  • Post comments:0 Comments
  • Post last modified:June 12, 2024
  • Reading time:2 mins read

The msg variable contains a String type value. Information about the number of characters of this string can be obtained using: msg.chars msg.charsAt() msg.length msg.length() Answers Explanation & Hints: To obtain…

Continue ReadingThe msg variable contains a String type value. Information about the number of characters of this string can be obtained using:

By default, JavaScript allows us to write to an undeclared variable (it declares it implicitly for us). If we want the interpreter to treat such a situation as an error, we have to:

  • Post author:
  • Post category:Blog
  • Post comments:0 Comments
  • Post last modified:June 12, 2024
  • Reading time:2 mins read

By default, JavaScript allows us to write to an undeclared variable (it declares it implicitly for us). If we want the interpreter to treat such a situation as an error,…

Continue ReadingBy default, JavaScript allows us to write to an undeclared variable (it declares it implicitly for us). If we want the interpreter to treat such a situation as an error, we have to:

In the daysOfWeek variable, we place an array with the names of the days of the week. To reverse the order of the array elements, we should call:

  • Post author:
  • Post category:Blog
  • Post comments:0 Comments
  • Post last modified:June 12, 2024
  • Reading time:1 mins read

In the daysOfWeek variable, we place an array with the names of the days of the week. To reverse the order of the array elements, we should call: reverse daysOfWeek; daysOfWeek.invert();…

Continue ReadingIn the daysOfWeek variable, we place an array with the names of the days of the week. To reverse the order of the array elements, we should call:

We need to come up with a name for a variable where we will store the age of a user. All of the following variable names are formally correct, but one of them is the most readable, indicate which one:

  • Post author:
  • Post category:Blog
  • Post comments:0 Comments
  • Post last modified:June 12, 2024
  • Reading time:1 mins read

We need to come up with a name for a variable where we will store the age of a user. All of the following variable names are formally correct, but…

Continue ReadingWe need to come up with a name for a variable where we will store the age of a user. All of the following variable names are formally correct, but one of them is the most readable, indicate which one:

In order to check the number of elements of the array stored in the names variable, we call:

  • Post author:
  • Post category:Blog
  • Post comments:0 Comments
  • Post last modified:June 12, 2024
  • Reading time:2 mins read

In order to check the number of elements of the array stored in the names variable, we call: names.length names.count length of names; names.length(); Answers Explanation & Hints: To check the…

Continue ReadingIn order to check the number of elements of the array stored in the names variable, we call:

We declare an object called dog, with two fields: age and name: To change the value of the age field to 6 , we need to perform:

  • Post author:
  • Post category:Blog
  • Post comments:0 Comments
  • Post last modified:June 12, 2024
  • Reading time:2 mins read

We declare an object called dog, with two fields: age and name: let dog = {       age: 5.       name: "Axel }; To change the value of…

Continue ReadingWe declare an object called dog, with two fields: age and name: To change the value of the age field to 6 , we need to perform:

The basic toolkit needed to effectively develop JavaScript code consists of two elements:

  • Post author:
  • Post category:Blog
  • Post comments:0 Comments
  • Post last modified:June 12, 2024
  • Reading time:2 mins read

The basic toolkit needed to effectively develop JavaScript code consists of two elements: interpreter, package manager. interpreter, debugger. code editor, interpreter. code editor, debugger. Answers Explanation & Hints: The basic…

Continue ReadingThe basic toolkit needed to effectively develop JavaScript code consists of two elements:

What tag do we use in HTML to denote the main part of the document inside which we define the page elements?

  • Post author:
  • Post category:Blog
  • Post comments:0 Comments
  • Post last modified:June 12, 2024
  • Reading time:2 mins read

What tag do we use in HTML to denote the main part of the document inside which we define the page elements? <body> <head> <content> <main> Answers Explanation & Hints:…

Continue ReadingWhat tag do we use in HTML to denote the main part of the document inside which we define the page elements?