Fullstack Javascript Test
Es2015

# ECMAScript 2015+

## Question #33

The following code snippet is valid in modern JavaScript. It uses many concepts and it will run without any errors (but basically does nothing useful):

```(async x => {
const { mystery: fun } = {
[x]: (a = 3, { b = 3 } = {}) => value => [a * b],
};
[x] = await fun(2)('TEST');
console.log(x);
})(`\${'my'}stery`);```

Which of the following JavaScript concepts is NOT used within this code snippet?

A) Destructuring an array

B) Closures

C) Object literal shorthand property name

D) Object literal computed property name

## Question #34

How do you define a static method X in a JavaScript class?

A)

```#X() {
}```

B)

```static X() {
}```

C)

```X() static {
}```

D) You can’t! JavaScript classes don’t support any static method syntax.

## Question #35

What is the value of `dessert.type` after executing this code?

```const dessert = { type: 'pie' };
dessert.type = 'pudding';```

A) `pudding`

B) `pie`

C) The code will throw an error

D) `undefined`

## Question #36

Which of the following is a valid string value in JavaScript?

A)

`'This is a \${'test'}'`

B)

`"This is a \${"test"}"`

C)

````This is
a \${'test'}````

D)

```'This is
a test'```

## Question #37

JavaScript "Strict Mode":

A) Eliminates some JavaScript silent errors by changing them to throw errors.

B) Fixes mistakes that make it difficult for JavaScript engines to perform optimizations

C) Prohibits some syntax likely to be defined in future versions of the language

D) All of the above

## Question #38

Which of the following will result in the variable `fourth` having the value `40`?

A) `const {4: fourth} = [10, 20, 30, 40];`

B) `const [first, second, fourth] = [10, 20, 30, 40];`

C) `const {first, second,, fourth} = [10, 20, 30, 40];`

D) `const [first, second,, fourth] = [10, 20, 30, 40];`

## Question #39

What is the name of a function whose execution can be suspended and resumed at a later point?

A) Async/Await function

B) Promise function

C) Arrow function

D) Generator function

## Question #40

How do you import the lodash library making its top-level API available as the `_` variable?

A) `import lodash as _ from 'lodash';`

B) `import _ from 'lodash';`

C) `import 'lodash' as _;`

D) `import '_' from 'lodash';`
{"ft_lang_label":"__label__en","ft_lang_prob":0.56573254,"math_prob":0.62732196,"size":1192,"snap":"2020-34-2020-40","text_gpt3_token_len":369,"char_repetition_ratio":0.12289562,"word_repetition_ratio":0.038647342,"special_character_ratio":0.3431208,"punctuation_ratio":0.13502109,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9664323,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-09-30T08:11:18Z\",\"WARC-Record-ID\":\"<urn:uuid:c79cb561-9aa3-43ad-9ebb-92b59f1c03ad>\",\"Content-Length\":\"35225\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:d7ace6c8-2bca-4ef3-af08-f4f658d8078d>\",\"WARC-Concurrent-To\":\"<urn:uuid:89638824-540d-4df7-ba88-bec625847f60>\",\"WARC-IP-Address\":\"172.67.186.201\",\"WARC-Target-URI\":\"https://jscomplete.com/learn/fullstack-javascript-test/1tjs-es2015\",\"WARC-Payload-Digest\":\"sha1:GHPGEJ4DKSKJG5Z6OLJWNYWA6DLSNP6B\",\"WARC-Block-Digest\":\"sha1:5SDOGW5AO6AUH3OAN5XSIGKSFK33W7OQ\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-40/CC-MAIN-2020-40_segments_1600402123173.74_warc_CC-MAIN-20200930075754-20200930105754-00299.warc.gz\"}"}