본문 바로가기

분류 전체보기

(54)
(20/60) Refer to the code below: What is the value of result when the code executes? Refer to the code below: function changeValue(param) { param = 5; } let a = 10; let b = a; changeValue(b); // Call by Value const result = a + ' - ' + b; console.log(result); What is the value of result when the code executes? https://onecompiler.com/javascript/3ynj47td8 3ynj47td8 - JavaScript - OneCompiler Javascript Online Compiler Write, Run & Share Javascript code online using OneCompiler's ..
(19/60) A developer has two ways to write a function:Option A:function Monster() {This.growl = () => {Console.log ("Grr!");}}Option B:function Monster() {};Monster.prototype.growl =() => {console.log("Grr!");}After deciding on an option, the developer c.. // Option A function Monster() { this.growl = () => { console.log ("Grr!"); } } // Option B function Monster() {}; Monster.prototype.growl =() => { console.log("Grr!"); } Option A는 1000개의 메소드가 생성이되고, Option B는 1개의 메소드가 생성이 된다. https://onecompiler.com/javascript/3ynj3u3wf 3ynj3u3wf - JavaScript - OneCompiler Javascript Online Compiler Write, Run & Share Javascript code online using OneCompiler's ..
(18/60) A developer at Universal Containers creates a new landing page based on HTML, CSS, andJavaScript TO ensure that visitors have a good experience, a script named personaliseContextneeds to be executed when the webpage is fully loaded (HTML content.. onload가 아닌 load 파라메터를 넘겨주어야 한다. https://developer.mozilla.org/en-US/docs/Web/API/Window/load_event Window: load event - Web APIs | MDN The load event is fired when the whole page has loaded, including all dependent resources such as stylesheets and images. This is in contrast to DOMContentLoaded, which is fired as soon as the page DOM has been loaded, without waiting for resources to fini develo..
(17/60) Given the code below: Which method can be used to provide a visual representation of the list of users and to allow sorting by the name or email attribute? https://onecompiler.com/javascript/3ynffkrn9 3ynffkrn9 - JavaScript - OneCompiler function Person(name, email) { this.name = name; this.email = email; } const john = new Person('John', 'john@email.com'); const jane = new Person('Jane', 'jane@email.com'); const emily = new Person('Emily', 'emily@email.com'); let usersList = [john, jane, onecompiler.com
(16/60) Given the following code:Counter = 0;const logCounter = () => {console.log(counter););logCounter();setTimeout(logCOunter, 1100);setInterval(() => {Counter++logCounter();}, 1000);What is logged by the first four log statements? setTimeout 함수가 호출 될 때 logCounter 함수가 호출되는 것에 대한 예약이 되어 있는 듯? 그렇지 않고서는 counter 값이 1일 수가 없는데..ㅠ https://onecompiler.com/javascript/3ynfeq23s 3ynfeq23s - 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 ..
(15/60) Refer to the following object:const cat ={firstName: 'Fancy',lastName: ' Whiskers',Get fullName() {return this.firstName + ' ' + this.lastName;}};How can a developer access the fullName property for cat? 답이 C. cat.fullName() 가 아님에 주의. 객체의 값을 받아오기 위해 함수 선언 없이 getter 로 사용할 수 있도록 접근자를 제공한다. https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Functions/get 접근자 - JavaScript | MDN get 구문은 객체의 속성 접근 시 호출할 함수를 바인딩합니다. developer.mozilla.org const obj = { log: ['a', 'b', 'c'], get latest() { return this.log[this.log.length - 1]; } }; console.log(obj.latest); // expected output: "c" https://onec..
(14/60) Refer to the code below:Function Person(firstName, lastName, eyecolor) {this.firstName =firstName;this.lastName = lastName;this.eyeColor = eyeColor;}Person.job = 'Developer';const myFather = new Person('John', 'Doe');console.log(myFather.job);Wh.. https://onecompiler.com/javascript/3ynfdfw7a 3ynfdfw7a - JavaScript - OneCompiler function Person(firstName, lastName, eyecolor) { this.firstName =firstName; this.lastName = lastName; this.eyeColor = eyeColor; } Person.job = 'Developer'; const myFather = new Person('John', 'Doe'); console.log(myFather.job);​ onecompiler.com
(13/60) A developer creates a simple webpage with an input field. When a user enters text inthe input field and clicks the button, the actual value of the field must be displayed in the console. Here is the HTML file content: