Refer to the code below:
Let str = 'javascript';
Str[0] = 'J';
Str[4] = 'S';
After changing the string index values, the value of str is 'javascript'. What is the reason for this value:
A. Primitive values are immutable.
B. Non-primitive values are immutable.
C. Non-primitive values are mutable.
D. Primitive values are mutable.
正解:A
質問 2:
Refer to the code below:
01 const server = require('server');
02 /* Insert code here */
A developer imports a library that creates a web server. The imported library uses events and callbacks to start the servers Which code should be inserted at the line 03 to set up an event and start the web server ?
A. server.on(' connect ' , ( port) => {
console.log('Listening on ' , port) ;})
B. Server.start ();
C. serve(( port) => (
D. console.log( 'Listening on ', port) ;
E. server()
正解:A
質問 3:
Refer to the code below:
Const myFunction = arr => {
Return arr.reduce((result, current) =>{
Return result = current;
}, 10};
}
What is the output of this function when called with an empty array ?
A. Returns NaN
B. Returns 10
C. Throws an error
D. Returns 0
正解:A
質問 4:
Refer to the string below.
Const str='Salesforce';
Which two statements results in the word 'Sales'?
正解:
Str.substring(0,5);
Str.substr(0,5);
質問 5:
Refer to the HTML below:

Which JavaScript statement results in changing " The Lion."?
A. document.querySelectorAll('$main $TONY').innerHTML = '" The Lion
B. document.querySelector('$main li:nth-child(2)'),innerHTML = " The Lion. ';
C. document.querySelector('$main li.Tony').innerHTML = '" The Lion ';
D. document.querySelector('$main li:second-child').innerHTML = " The Lion ';
正解:A
質問 6:
Refer to the following code block:

What is the console output?
A. > Better student Jackie got 100% on test.
B. > Jackie got 70% on test.
C. > Uncaught Reference Error
D. > Better student Jackie got 70% on test.
正解:A
質問 7:
The developer has a function that prints "Hello" to an input name. To test this, thedeveloper created a function that returns "World". However the following snippet does not print " Hello World".

What can the developer do to change the code to print "Hello World" ?
A. Change line 9 to sayHello(world) ();
B. Change line 7 to ) () ;
C. Change line 2 to console.log('Hello' , name() );
D. Change line 5 to function world ( ) {
正解:C
質問 8:
A developer wants to leverage a module to print a price in pretty format, and has imported a method as shown below:
Import printPrice from '/path/PricePrettyPrint.js';
Based on the code, what must be true about the printPrice function of the PricePrettyPrint module for this import to work ?
A. printPrice must be an all export
B. printPrice must be a multi exportc
C. printPrice must be be a named export
D. printPrice must be the default export
正解:D
質問 9:
Which two console logs outputs NaN ?
Choose 2 answers
A. console.log(10/ Number('5'));
B. console.log(10/ ''five);
C. console.log(10/0);
D. console.log(parseInt('two'));
正解:B,D
Kataoka -
至れり尽くせりのCRT-600一冊だなって思いました。すごく参考になると思いました。