본문 바로가기

salesforce certification

(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 - 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 OneCompiler's Javascript editor is

onecompiler.com