본문 바로가기

전체 글

(54)
(12/60) A developer creates a generic function to log custom messages in the console. To do this,the function below is implemented.01 function logStatus(status){02 console./*Answer goes here*/{'Item status is: %s', status};03 }Which three console loggin.. https://onecompiler.com/javascript/3ynf38ghj 3ynf38ghj - JavaScript - OneCompiler var status = 'test'; //console.message('Item status is: %s', status); // error console.assert('assert : Item status is: %s', status); // assert는 에러일 때만 실행됨 console.info('info : Item status is: %s', status); console.log('log : Item status onecompiler.com https://developer.mozilla.org/ko/docs/Web/API/console console ..
(11/60) A developer creates a class that represents a blog post based on the requirement that aPost should have a body author and view count.The Code shown Below:Class Post {// Insert code hereThis.body =bodyThis.author = author;this.viewCount = viewCou.. 생성자 문법 class Polygon { constructor() { this.name = 'Polygon'; } } const poly1 = new Polygon(); console.log(poly1.name); // expected output: "Polygon" constructor() { ... } constructor(argument0) { ... } constructor(argument0, argument1) { ... } constructor(argument0, argument1, ... , argumentN) { ... } class Person { constructor(name) { this.name = name; } introduce() { console.log(`Hello, my na..
(10/60) Refer to the code below:Const resolveAfterMilliseconds = (ms) => Promise.resolve (setTimeout (( => console.log(ms), ms ));Const aPromise = await resolveAfterMilliseconds(500);Const bPromise = await resolveAfterMilliseconds(500);Await aPromise, w.. Refer to the code below: const resolveAfterMilliseconds = (ms) => Promise.resolve ( setTimeout (( => console.log(ms), ms )); const aPromise = await resolveAfterMilliseconds(500); const bPromise = await resolveAfterMilliseconds(500); await aPromise, wait bPromise; What is the result of running line 05? 이유는 모르겠음. 코드 실행안되므로 답이 D인가??
(9/60) myArraym can have one level, two levels, or more levels.Which statement flattens myArray when it can be arbitrarily nested? 답이 틀렸음. C가 답이다. https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/Array/flat Array.prototype.flat() - JavaScript | MDN flat() 메서드는 모든 하위 배열 요소를 지정한 깊이까지 재귀적으로 이어붙인 새로운 배열을 생성합니다. developer.mozilla.org
(8/60) Which statement accurately describes an aspect of promises? 참고자료 : https://joshua1988.github.io/web-development/javascript/promise-for-beginners/ 자바스크립트 Promise 쉽게 이해하기 (중급) 자바스크립트 입문자를 위한 Promise 설명. 쉽게 알아보는 자바스크립트 Promise 개념, 사용법, 예제 코드. 예제로 알아보는 then(), catch() 활용법 joshua1988.github.io
(7/60) Refer to code below:console.log(0);setTimeout(() => (console.log(1);});console.log(2);setTimeout(() => {console.log(3);), 0);console.log(4);In which sequence will the numbers be logged? Refer to code below: console.log(0); setTimeout(() => { console.log(1); }); console.log(2); setTimeout(() => { console.log(3); }, 0); console.log(4); In which sequence will the numbers be logged? https://onecompiler.com/javascript/3yncbmub3 3yncbmub3 - JavaScript - OneCompiler Javascript Online Compiler Write, Run & Share Javascript code online using OneCompiler's JS online compiler for free. It..
(6/60) Refer to the code below:for(let number =2 ; number <= 5 ; number += 1 ) {// insert code statement here}The developer needs to insert a code statement in the location shown. The codestatement has these requirements:1. Does require an import2. Logs.. Refer to the code below: for ( let number=2 ; number
(5/60) Refer to code below:Let first = 'who';Let second = 'what';Try{Try{Throw new error('Sad trombone');}catch (err){First ='Why';}finally {Second ='when';} catch (err) {Second ='Where';}What are the values for first and second once the code executes ? Refer to code below: let first = 'Who'; let second = 'What'; try{ try{ throw new Error('Sad trombone'); } catch(err){ first='why'; throw err; } finally { second='when'; } } catch(err){ second='where'; } console.log(first, second); What are the values for first and second once the code executes? throw err; 들어가있으면 B. 안들어가있으면 D. 가 정답이다. https://onecompiler.com/javascript/3wmwpcev3 3wmwpcev3 - JavaS..