Deprecated: Function wp_img_tag_add_loading_attr is deprecated since version 6.3.0! Use wp_img_tag_add_loading_optimization_attrs() instead. in /home/692487.cloudwaysapps.com/qjetrwsbsm/public_html/wp-includes/functions.php on line 5453

Deprecated: Function wp_get_loading_attr_default is deprecated since version 6.3.0! Use wp_get_loading_optimization_attributes() instead. in /home/692487.cloudwaysapps.com/qjetrwsbsm/public_html/wp-includes/functions.php on line 5453

Deprecated: Function wp_img_tag_add_loading_attr is deprecated since version 6.3.0! Use wp_img_tag_add_loading_optimization_attrs() instead. in /home/692487.cloudwaysapps.com/qjetrwsbsm/public_html/wp-includes/functions.php on line 5453

Deprecated: Function wp_get_loading_attr_default is deprecated since version 6.3.0! Use wp_get_loading_optimization_attributes() instead. in /home/692487.cloudwaysapps.com/qjetrwsbsm/public_html/wp-includes/functions.php on line 5453

What value is printed when the following code runs?
var burger = ["bun", "beef", "lettuce", "tomato sauce", "onion", "bun"];
  console.log(burger[2]);

Practice More Questions From: Module quiz: The Building Blocks of a Program

Q:

What data type is the variable x ? var x = {};

Q:

What will be the output of running the following code? try {console.log(‘hello)} catch(e) {console.log(‘caught’)}

Q:

What value is printed when the following code runs? var burger = [“bun”, “beef”, “lettuce”, “tomato sauce”, “onion”, “bun”]; console.log(burger[2]);

Q:

In the following code, how many methods does the bicycle object have? var bicycle = { wheels: 2, start: function() { }, stop: function() { } };

Q:

When the following code runs, what will print out? try {​ throw new Error();​ console.log(‘Hello’); } catch(err) {​ console.log(‘Goodbye’); }

Q:

If you mis-type some code in your JavaScript, what kind of error will that result in?

Q:

Will the following code execute without an error? function add(a, b) { console.log(a + b)​ }​ add(3, “4”);

Q:

What will be printed when the following code runs? var result; console.log(result);

Q:

What will be the output of the following code? var str = “Hello”;str.match(“jello”);

Q:

What will be the output of the following code? try {Number(5).toPrecision(300)} catch(e) {console.log(“There was an error”)}

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments