Refer to the code below:Let str = `javascript';Str[0] = `J';Str[4] = 'S';After changing the string indexvalues, the value of str is `javascript'. What is the reason for this value:
Answer(s): D
Referto the code below:new Promise((resolve, reject) => {const fraction = Math.random();if( fraction >0.5) reject("fraction > 0.5, " + fraction); resolve(fraction);}).then(() =>console.log("resolved")).catch((error) => console.error(error)).finally(() =>console.log(" when am I called?"));When does Promise.finally on line 08 get called?
Refer to the following array:Let arr1 = [ 1,2, 3, 4, 5 ];Which two lines of code result in a second array, arr2 being created such that arr2 is not a reference to arr1?
Answer(s): A,B
Refer to code below:Function muFunction(reassign){Let x = 1;var y = 1;if( reassign ) {Let x= 2;Var y = 2;console.log(x);console.log(y);}console.log(x);console.log(y);}What is displayed when myFunction(true) is called?
Answer(s): C
A developer wants to create an object from a function in the browser using the code below:Function Monster() { this.name = `hello' };Const z = Monster();What happens due to lackof the new keyword on line 02?
Post your Comments and Discuss Salesforce Certified JavaScript Developer I exam prep with other Community members:
Our website is free, but we have to fight against AI bots and content theft. We're sorry for the inconvenience caused by these security measures. You can access the rest of the Certified JavaScript Developer I content, but please register or login to continue.