Victor A

2 min read

JavaScript Test nr.1

CodingTestsjavascript

JavaScript Beginner Test

Time Elapsed: 0 seconds

1. What is the output of the following code?

```javascript console.log(5 + 3 * 2); ```



2. Which keyword is used to declare a constant in JavaScript?





3. How do you declare a function in JavaScript?





4. What is the output of the following code?

```javascript let x = 5; let y = 10; console.log(x == y); ```



5. How do you create an array in JavaScript with the elements 1, 2, and 3?

6. Explain the difference between let and var in JavaScript.

7. Write a JavaScript expression to check if the string "hello" contains the substring "ell".

8. What is the purpose of the async and await keywords in JavaScript?