Refer to the code below:
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:A . Non-primitive values are mutable.B . Non-primitive values are immutable.C . Primitive values are mutable.D . Primitive...
Which code statement below correctly persists an objects in local Storage?
Which code statement below correctly persists an objects in local Storage? A . const setLocalStorage = (storageKey, jsObject) => {window.localStorage.setItem(storageKey, JSON.stringify(jsObject));}B . const setLocalStorage = (jsObject) => {window.localStorage.connectObject(jsObject));}C . const setLocalStorage= (jsObject) => {window.localStorage.setItem(jsObject);}D . const setLocalStorage = (storageKey, jsObject) => {window.localStorage.persist(storageKey, jsObject);}View AnswerAnswer: A
Which two options access the email attribute in the object?
A developer uses a parsed JSON string to work with user information as in the block below: 01 const userInformation ={ 02 “ id ”: “user-01”, 03 “email”: “[email protected]”, 04 “age”: 25 Which two options access the email attribute in the object? Choose 2 answersA . userInformation(“email”)B . userInformation.get(“email”)C ....
Which function should a developer use to repeatedly execute code at a fixed interval?
Which function should a developer use to repeatedly execute code at a fixed interval?A . setIntervelB . setTimeoutC . setPeriodD . setInteriaView AnswerAnswer: A
GIven a value, which three options can a developer use to detect if thevalue is NaN? Choose 3 answers
GIven a value, which three options can a developer use to detect if thevalue is NaN? Choose 3 answersA . value == NaNB . Object.is(value, NaN)C . value === Number.NaND . value ! == valueE . Number.isNaN(value)View AnswerAnswer: A,E
Which option makes the code work as expected?
A developer is required to write a function that calculates the sum of elements in an array but is getting undefined every time the code is executed. The developer needs to find what is missing in the code below. Const sumFunction = arr => { Return arr.reduce((result, current) => {...
What is the value of copy?
Given the code below: const copy = JSON.stringify([ newString(‘ false ’), new Bollean( false ), undefined ]); What is the value of copy?A . -- [ ”false”, { } ]--B . -- [ false, { } ]--C . -- [ ”false”, false, undefined ]--D . -- [ ”false”,false, null ]--View...
Which three options show valid methods for creating a fat arrow function?
Which three options show valid methods for creating a fat arrow function? Choose 3 answersA . x => (console.log(‘ executed ’) ; )B . [ ] => (console.log(‘ executed ’) ;)C . () => (console.log(‘ executed ’) ;)D . X,y,z => (console.log(‘ executed ’) ;)E . (x,y,z) => (console.log(‘ executed...
What is the data type of pi?
Refer to the code below: Const pi = 3.1415326, What is the data type of pi?A . DoubleB . NumberC . DecimalD . FloatView AnswerAnswer: B
What is the result of the code block?
What is the result of the code block?A . The console logs only ‘flag’.B . The console logs ‘flag’ and another flag.C . An error is thrown.D . The console logs ‘flag’ and then an error is thrown.View AnswerAnswer: A