본문 바로가기

분류 전체보기

(54)
(60/60) Given the requirement to refactor the code above to JavaScript class format, which class definition is correct?
(59/60) A test has a dependency on database.query. During the test the dependency is replacedwith an object called database with the method, query, that returns an array. Thedeveloper needs to verify how many times the method was called and the argument.. https://devinus.tistory.com/6 [정보처리기사] 화이트박스 테스트와 블랙박스 테스트 1. 화이트박스 테스트(White Box Test) - 화이트박스 테스트는 모듈의 원시 코드를 오픈시킨 상태에서 원시 코드의 논리적인 모든 경로를 테스트하여 테스트 케이스를 설계하는 방법이다. 화이트박 devinus.tistory.com https://www.crocus.co.kr/1555 [Mockito] Mock 개념(Mock Object) 단위 테스트를 하기 위해서는 한번에 메서드 하나만을 실행해 보는 것인데 이러한 메서드가 다른 네트워크, 데이터베이스 등등 제어하기 어려운 것들에 의존하고 있다면 어떻게 단위 테스트를 www.crocus.co.kr https://gocheat.github.io/..
(58/60) A developer wants to create an object from a function in the browser using the codebelow:Function Monster() { this.name = 'hello' };Const z = Monster();What happens due to lack of the new keyword on line 02? function Monster() { this.name = 'hello' }; const z = Monster(); console.log(this.name); console.log(name); console.log(z); https://onecompiler.com/javascript/3ynnkjndp 3ynnkjndp - JavaScript - OneCompiler Javascript Online Compiler Write, Run & Share Javascript code online using OneCompiler's JS online compiler for free. It's one of the robust, feature-rich online compilers for Javascript langu..
(57/60) developer is trying to convince management that their team will benefit from usingNode.js for a backend server that they are going to create. The server will be a web server thathandles API requests from a website that the team has already built.. About D. -> using Node js by itself does not offer any sort of static analysis. Node.js is dynamic javascript just like in the browser.
(56/60) Refer to the code below:let o = {get js() {let city1 = String("st. Louis");let city2 = String(" New York");return {firstCity: city1.toLowerCase(),secondCity: city2.toLowerCase(),}}}What value can a developer expect when referencing o.js.secondCi.. let o = { get js() { let city1 = String("st. Louis"); let city2 = String(" New York"); return { firstCity: city1.toLowerCase(), secondCity: city2.toLowerCase(), } } } console.log(o.js.secondCity); https://onecompiler.com/javascript/3ynnjnzg5 3ynnjnzg5 - JavaScript - OneCompiler Javascript Online Compiler Write, Run & Share Javascript code online using OneCompiler's JS online compiler for free. I..
(55/60) Refer to the code below:let sayHello = () => {console.log ('Hello, world!');};Which code executes sayHello once, two minutes from now? let sayHello = () => { console.log('Hello, world!'); }; setTimeout(sayHello, 12000); https://onecompiler.com/javascript/3ynnj6cmc 3ynnj6cmc - JavaScript - OneCompiler Javascript Online Compiler Write, Run & Share Javascript code online using OneCompiler's JS online compiler for free. It's one of the robust, feature-rich online compilers for Javascript language. Getting started with the OneCompil..
(54/60) A developer wants to iterate through an array of objects and count the objects and countthe objects whose property value, name, starts with the letter N.Const arrObj = [{"name" : "Zach"} , {"name" : "Kate"},{"name" : "Alise"},{"name" : "Bob"},{".. const arrObj = [ {"name" : "Zach"}, {"name" : "Kate"}, {"name" : "Alise"}, {"name" : "Bob"}, {"name" : "Natham"}, {"name" : "nathaniel"} ]; let val; arrObj.reduce((acc, curr) => { //missing line 02 console.log("acc : " + JSON.stringify(acc)); console.log("curr : " + JSON.stringify(curr)); const sum = curr.name.startsWith('N') ? 1: 0; //missing line 03 val = acc + sum; //return acc + sum; //retur..
(53/60) Given the expressions var1 and var2, what are two valid ways to return the concatenation of the two expressions and ensure it is string? Choose 2 answers var var1 = 0; var var2 = 1; console.log(var1 + var2); console.log(var1.toString() + var2.toString()); console.log(String(var1).concat(var2)); console.log(String.concat(var1 + var2)); // error https://onecompiler.com/javascript/3ynndknwc 3ynndknwc - JavaScript - OneCompiler Javascript Online Compiler Write, Run & Share Javascript code online using OneCompiler's JS online compiler for free. It's o..