0% found this document useful (0 votes)
4K views32 pages

Questions

The function returns 1 if the val parameter is truthy, otherwise it returns 2. It returns the val parameter.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4K views32 pages

Questions

The function returns 1 if the val parameter is truthy, otherwise it returns 2. It returns the val parameter.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 32

function whatDoesItDo(val) { }

return val ? 1:2;


}
Select one:
Select one:
a.
a.
Returns only blue and green
It always returns 2

b.
b.
Returns blue, green or red, depending on the parameter "color"
It returns 1 if val is truthful, otherwise 2

c.
c.
Always returns red
It returns val
Feedback
Feedback
Your answer is correct.
Your answer is correct.
The correct answer is: Always returns red
The correct answer is: It returns 1 if val is truthful, otherwise 2
Question 3
Question 2
Correct
Correct Mark 1.00 out of 1.00
Mark 2.00 out of 2.00

Flag question
Flag question
Question text
Question text
function whatDoesItDo() {
function whatDoesItDo(color) {
return document.querySelectorAll('*').length;
if (color !== 'blue' || color !== 'green') {
color = 'red'; }

} Select one:
return color;
a. document.body.innerHTML("Hello World");
Initializes an empty XHTML namespace
d.
b. document.body.innerText = "Hello World";
Throws an error
Feedback
Your answer is correct.
c.
The correct answers are: document.body.innerHTML = "Hello
Returns the number of elements on the page
World";, document.body.innerText = "Hello World";
Feedback
Your answer is correct. Question 5
Correct
The correct answer is: Returns the number of elements on the Mark 1.00 out of 1.00
page
Flag question
Question 4
Correct Question text
Mark 1.00 out of 1.00 What method do we use to create an event listener?

Flag question Select one:

Question text a.
Which of these lines of code would replace the content of a element.makeEventListener()
webpage with "Hello World"?

Select one or more: b.


element.on()
a.
document.html = "Hello World"; c.
element.addEventListener()
b.
document.body.innerHTML = "Hello World"; Feedback
Your answer is correct.
c. The correct answer is: element.addEventListener()
Question 6 Question text
Correct Which command creates a new button?
Mark 1.00 out of 1.00
Select one:
Flag question
a.
Question text
var button = document.new('button')
Which event trigger indicates the DOM has finished loading and
processing?
b.
Select one: var button = document.makeElement('{button}');

a.
c.
DOMFinished
var button = document.createElement('button');

b.
d.
DOMReady
var button = document.createElement('');

c. Feedback
DOMContentLoaded Your answer is correct.
The correct answer is: var button =
d. document.createElement('button');
DocumentReady
Question 8
Feedback Correct
Your answer is correct. Mark 1.00 out of 1.00

The correct answer is: DOMContentLoaded Flag question

Question 7 Question text


Correct Which method selects the first matching element in the
Mark 1.00 out of 1.00 document?
Flag question Select one:
a.
document.getElementsByTagName()

b.
document.getElementsByClass()

c.
document.querySelectorAll()

d.
document.querySelector()
Feedback
Your answer is correct.
The correct answer is: document.querySelector()
Flag question
What is the function of the tag below?
<title> This tag </title>
Question text
In CSS, how would you select all the <p> tags on a page?

Select one:
Select one:
a.
a. #p { }
show the server how to title the website
b.
.p { }
b.
show the server how to index the website
c.
<p> { }
c.
store meta information about the title
d.
p{}
d.
Feedback
stores the title of the website for the browser and search engine
Your answer is correct.
results
The correct answer is: p { }
Feedback
Your answer is correct. Question 3
Correct
The correct answer is:
Mark 1.00 out of 1.00
stores the title of the website for the browser and search engine
results Flag question

Question 2 Question text


Correct What is the default value of the position property?
Mark 1.00 out of 1.00
Select one:
a. a.
fixed #warning { }

b. b.
relative warning { }

c. c.
static p{}

d. d.
absolute .warning { }
Feedback Feedback
Your answer is correct. Your answer is correct.
The correct answer is: static The correct answer is: .warning { }

Question 4 Question 5
Correct Correct
Mark 1.00 out of 1.00 Mark 1.00 out of 1.00

Flag question Flag question

Question text Question text


In CSS, how would you select only the paragraphs with class name Which tag contains ALL of the website's visible content?
"warning"?
Select one:
<p class="warning">Don't do it.</p>
<p>Do it.</p>
<p class="warning">Nooo, don't do it.</p> a.
start

b.
Select one:
body
c.
padding:10px 15px 5px 10px;
c.
title
d.
padding:15px 5px 10px 10px;
d.
head Feedback
Your answer is correct.
Feedback
Your answer is correct. The correct answer is: padding:10px 5px 15px 10px;
The correct answer is: body Question 7
Incorrect
Question 6 Mark 0.00 out of 1.00
Correct
Mark 1.00 out of 1.00
Flag question

Flag question Question text


Which snippet of CSS is commonly used to center a website
Question text
horizontally?
How do you insert padding so that it is:
10 pixels at the top Select one:
15 pixels at the bottom
5 pixels at the right a.
10 pixels to the left? site-align: center;

Select one:
b.
a. margin: auto 0;
padding:10px 5px 15px 10px;
c.
b. margin: center;
padding:10px 5px 10px 15px;
Feedback
Your answer is correct.

d. The correct answer is: Cascading Style Sheets


margin: 0 auto;
Feedback
Your answer is incorrect.
The correct answer is: margin: 0 auto;
Question 1
Question 8 Correct
Correct Mark 1.00 out of 1.00
Mark 1.00 out of 1.00
Flag question
Flag question
Question text
Question text What will be printed in the browser console for the following
What does CSS stand for? code?
Select one: var firstName = 'John';
var fullName = firstName + ' ' + lastName;
a. var lastName = 'Doe';
Colorful Style Sheets
console.log(fullName);
b.
Cascading Style Sheets
Select one or more:
c.
Computer Style Sheets a.
John undefined
d.
Creative Style Sheets b.
John null
c.
c. Global scope
John Doe
d.
d. Starting from the line where it was declared
undefined undefined
e.
e. Current for loop only
ReferenceError: lastName is not defined
Feedback
Feedback Your answer is partially correct.
Your answer is correct.
You have correctly selected 1.
The correct answer is: John undefined The correct answers are: Enclosing function scope, Global scope

Question 2 Question 3
Partially correct Correct
Mark 0.50 out of 1.00 Mark 1.00 out of 1.00

Flag question Flag question

Question text Question text


What is the scope of a variable when declaring it using 'var' Static methods:
keyword?
Select one or more:
Select one or more:
a.
a. They don't need a class instance to use them
Block scope
b.
b. they don't need a class definition to use them
Enclosing function scope
c.
Static methods are not inherited by child class automatically Question 5
Correct
Mark 1.00 out of 1.00
d.
"static" keyword marks static methods in ES6 Classes Flag question

Question text
e.
The following function can be rewritten using Arrow functions as
We don't have static methods in ES5 (prototype based) classes,
follows:
because there is no "static" keyword
Feedback
Your answer is correct. const getFullName = function(firstName, lastName) {

The correct answers are: They don't need a class instance to use return firstName + ' ' + lastName;
them, "static" keyword marks static methods in ES6 Classes }
Question 4 Select one:
Incorrect
Mark 0.00 out of 1.00
a.
const fullName = function(firstName, lastName) => firstName + '
Flag question
' + lastName;
Question text
Will the following code throw an error in browser console? b.
const fullName = (firstName, lastName) => firstName + ' ' +
lastName;
console.log(typeof x);

Select one: c.
True const fullName = (firstName, lastName)
False
=> firstName + ' ' + lastName;
Feedback
It will not throw an error , but it will print: undefined
d.
The correct answer is 'False'.
const fullName = (firstName, lastName) => { firstName + ' ' +
lastName; } e.
"class" keyword is a sugar syntax for "prototype" based classes
Feedback
Your answer is correct. Feedback
Your answer is partially correct.
The correct answer is: const fullName = (firstName, lastName) =>
firstName + ' ' + lastName; You have correctly selected 1.
The correct answers are: "Prototype" - it's one way of declaring
Question 6 classes in JS, Classes are just functions named with uppercase,
Partially correct
"class" keyword is a sugar syntax for "prototype" based classes
Mark 0.33 out of 1.00

Question 7
Flag question
Correct
Mark 1.00 out of 1.00
Question text
Check what you find true regarding Classes in Javascript: Flag question
Select one or more: Question text
Check the statements that you consider true for "const" keyword:
a.
the following code works just fine because of "hoisting": Select one or more:
const user = new User();
a.
class User {}; the value of a constant can not be reassigned

b. b.
We can create a class using "new" keyword a constant can not be redeclared

c. c.
"Prototype" - it's one way of declaring classes in JS variable hoisting is not applied to constants

d. d.
Classes are just functions named with uppercase const user = {
name: 'John',
age:22 console.log(x);
} Select one:
user.age = 30; True
False
The above code it's not throwing an error, and it works as
expected.
Feedback
The correct answer is 'True'.

e. Question 9
they are visible only in the current block scope Correct
Mark 1.00 out of 1.00
Feedback
Your answer is correct. Flag question

The correct answers are: they are visible only in the current block Question text
scope, the value of a constant can not be reassigned, a constant Check the statements that you consider true about declaring a
can not be redeclared, variable hoisting is not applied to variable using "let" keyword:
constants, const user = {
Select one or more:
name: 'John',
age:22
a.
}
the variable declared with "let" will be visible everywhere in current
user.age = 30;
function
The above code it's not throwing an error, and it works as
expected.
b.
Question 8 "let" works exactly the same as "var", but it's the ES6 word for it
Correct
Mark 1.00 out of 1.00
c.
Flag question the value of the variable can be changed after it was declared

Question text
Will the following code throw an error in browser console? d.
the variable declared with "let" will be visible only in current block Question text
The <title> element must be located inside
e.
It is not available in ES5 Select one:
Feedback
<head> element
Your answer is correct.
The correct answers are: It is not available in ES5, the variable
declared with "let" will be visible only in current block, the value of
the variable can be changed after it was declared it can be put in a simple div, section, article
Question 10
Correct <body> element
Mark 1.00 out of 1.00
Feedback
Flag question Your answer is correct.
Question text The correct answer is: <head> element

Arrow functions share the same Blank 1 as their surrounding code Question 2
Correct
Feedback Mark 0.20 out of 0.20
Your answer is correct.
Flag question
The correct answer is:
Arrow functions share the same [this] as their surrounding code Question text
What is an object in JavaScript ?

Select one:

Question 1 collection of classes


Correct
Mark 0.10 out of 0.10
collection of values
Flag question
collection of variables

collection of properties Select one:


Feedback True
Your answer is correct. False
Feedback
The correct answer is: collection of properties
The correct answer is 'True'.
Question 3
Correct Question 4
Mark 0.30 out of 0.30 Correct
Mark 0.30 out of 0.30
Flag question
Flag question
Question text
Question text
Choose the correct JavaScript syntax to change the content of the
following HTML code:
<p id="geek">GeeksforGeeks</p>

Select one:

document.getId(“geek”)=”I am a Geek”;
Is equivalent to:
document.getElementById(“geek”).innerHTML=”I am a Geek”;

document.getElement(“geek”).innerHTML=”I am a Geek”;

document.getElementById(“geek”).innerHTML=I am a Geek;
Feedback
Your answer is correct.
The correct answer JavaScript Object Notation is a syntax for serializing objects, arrays,
is: document.getElementById(“geek”).innerHTML=”I am a Geek”; numbers, strings, boolean and null, based on JavaScript object
syntax.
Question 5
Correct Select one:
Mark 0.10 out of 0.10 True
False
Flag question
Feedback
Question text The correct answer is 'True'.
How can you create a new Git repository in a "some_name"
directory ? Question 7
Correct
Select one: Mark 0.80 out of 0.80

git add some_name Flag question

Question text
Given the code below:
git create some_name

git init some_name


Feedback
Your answer is correct.
The correct answer is: git init some_name

Question 6
Correct
Mark 0.20 out of 0.20

Flag question

Question text
"One of the promises failed with the following reason" Uncaught
(in promise) {resolvedAfterNSeconds: 0}
Feedback
Your answer is correct.
The correct answer is: “All the promises are resolved” and the
values array of results [{resolvedAfterNSeconds: 1},
{resolvedAfterNSeconds: 4}, {resolvedAfterNSeconds: 2}]

Question 8
Correct
Mark 0.40 out of 0.40

Flag question

Question text
Given the code:

The output will be:

Select one:

“All the promises are resolved” and the values array of results
[{resolvedAfterNSeconds: 0}, {resolvedAfterNSeconds: 4},
{resolvedAfterNSeconds: 2}]
The value of this is:

“All the promises are resolved” and the values array of results Select one:
[{resolvedAfterNSeconds: 1}, {resolvedAfterNSeconds: 4},
The object created from this object
{resolvedAfterNSeconds: 2}]

myObject
the execution of the code will result in an error
Question 10
document Incorrect
Mark 0.00 out of 0.20

window Flag question


Feedback
Question text
Your answer is correct.
What is the result of the below JavaScript code ?
The correct answer is: window

Question 9
Correct
Mark 0.20 out of 0.20

Flag question

Question text
What is the correct CSS syntax for making all the <span> elements
bold ?

Select one: Select one:

span {text-size: bold} 3

span {font-weight: bold} undefined

<span style="font-size: bold"> null

span {text-weight: bold} none of the above


Feedback Feedback
Your answer is correct. Your answer is incorrect.
The correct answer is: span {font-weight: bold} The correct answer is: undefined
Question 11 True
Correct False
Mark 0.50 out of 0.50
Feedback
Flag question The correct answer is 'True'.

Question text Question 13


What has JavaScript ES6's new "class" keyword added to the Correct
Mark 0.40 out of 0.40
language?

Select one: Flag question

Question text
"class" keyword is syntax sugar for "prototype" based classes
What does the “this” keyword refer to in a function of a class?

"class" keyword is a new way of OOP in javascript Select one:

To the object that a function is a method of.


None of these
Feedback To the Class.
Your answer is correct.
The correct answer is: "class" keyword is syntax sugar for To the window object.
"prototype" based classes
none of these.
Question 12
Correct Feedback
Mark 0.20 out of 0.20
Your answer is correct.
Flag question The correct answer is: To the object that a function is a method of.
Question text Question 14
Can you pass an anonymous function as an argument to another Correct
function ? Mark 0.20 out of 0.20

Select one: Flag question


Question text
Which CSS selector applies to the bolded element(s) only? Flag question

<input type="button" value="Button" /> Question text


Arrow functions inherit the “this” from the parent scope, which is
<input type="submit" value="Submit button" />
called "lexical scoping"
<input type="checkbox" value="value" />
Select one:
<input type="text" value="Bal bla" /> True
False
Feedback
The correct answer is 'True'.
Select one: Question 16
Correct
input@submit{ ... } Mark 0.80 out of 0.80

Flag question
input.submit{ ... }
Question text
input.type=submit{ ... }

input[type=submit]{ ... }

none of the above


Feedback
Your answer is correct. The output of the above code will be:
The correct answer is: input[type=submit]{ ... } Select one:

Question 15
“Result: ” instantly and “Result: DONE” after 100 miliseconds
Correct
Mark 0.30 out of 0.30
Result: DONE after 100 miliseconds
Mark 0.20 out of 0.20
the execution of the code will result in an error
Flag question

“Result: undefined” will be printed, because x is undefined Question text


What will be the output of the following line in JavaScript? :
Feedback
"1"+2+3
Your answer is correct.
Select one:
The correct answer is: Result: DONE after 100 miliseconds

Question 17 123
Correct
Mark 0.10 out of 0.10
15
Flag question
23
Question text
How to pass "some changes" commit message to your git
commit ? 6

Select one: Feedback


Your answer is correct.
git push “some changes” The correct answer is: 123

Question 19
git commit -m “some changes”
Correct
Mark 0.50 out of 0.50
git commit “some changes”
Flag question
Feedback
Your answer is correct. Question text
Given the code:
The correct answer is: git commit -m “some changes”

Question 18
Correct
var games=[“Game1”, “Game2”, “Game3”]

var games=(1=Game1, 2=Geek2, 3=Game3)


Select one:
var games=(1:Game1, 2:Game2, 3:Game3)
Calling functionB with two parameters will return null
Feedback
Your answer is correct.
The syntax for functionB is not correct
The correct answer is: var games=[“Game1”, “Game2”, “Game3”]

Question 21
Calling functionA with two parameters will result in an error Incorrect
Mark 0.00 out of 0.80
Calling functionB with no parameters will return undefined
Flag question
Feedback
Your answer is correct. Question text

The correct answer is: Calling functionB with no parameters will


return undefined

Question 20
Correct
Mark 0.20 out of 0.20

Flag question

Question text
How to initialize an array in JavaScript?

Select one: The output of the above code will be:

Select one:
var games={“Game1”, “Game2”, “Game3”}
“Result: undefined” will be printed, because x is undefined 2

Result: DONE after 100 milliseconds 3

the execution of the code will result in an error 0

“Result: ” instantly and “Result: DONE” after 100 miliseconds 1


Feedback Feedback
Your answer is incorrect. Your answer is correct.
The correct answer is: “Result: undefined” will be printed, because The correct answer is: 1
x is undefined
Question 23
Question 22 Correct
Correct Mark 0.10 out of 0.10
Mark 0.30 out of 0.30
Flag question
Flag question
Question text
Question text Which CSS selector applies to the bolded element(s) only?
What will be the console output of the following code?
<p>
<ul>
<li>
<a href="http://example.com">I am special!</a>
</li>
</ul>
<a href="http://example.com">Me too.</a>
Select one:
</p>
The 'private' property

The 'protected' property


Select one or more:
The 'public' property
p a{ ... }

The 'prototype' property


a{ ... }
Feedback
Your answer is correct.
a ul{ ... }
The correct answer is: The 'prototype' property
#a{ ... } Question 25
Incorrect
Mark 0.00 out of 0.20
none of the above
Flag question
Feedback
Question text
Your answer is correct.
HTTP is a stateless protocol. In order to make is stateful we can
The correct answers are: p a{ ... }, a{ ... } use:

Question 24 Select one:


Correct
Mark 0.30 out of 0.30 local storage

Flag question
cookies
Question text
What is the name of the property that allows you to add
session storage
properties and methods to an object?

Select one: all of the above


Feedback Select one:
Your answer is incorrect.
document.cookie = “newCookie=someValue”
The correct answer is: cookies

Question 26 document.cookie = newCookie=someValue


Correct
Mark 0.20 out of 0.20
document.cookie = “newCookie:someValue”
Flag question

Question text document.cookie = “newCookie”


What HTML form input should we use to present multiple options, Feedback
but to select only one ? Your answer is correct.
Select one: The correct answer is: document.cookie =
“newCookie=someValue”
<input type=”radio” />
Question 28
Incorrect
<input type=”text” /> Mark 0.00 out of 0.30

Flag question
<input type=”checkbox” />
Feedback Question text
Your answer is correct. Can a JavaScript constructor return a primitive value (e.g. a number
or a string)?
The correct answer is: <input type=”radio” />
Select one:
Question 27
Correct Yes
Mark 0.30 out of 0.30

Flag question Only in a function

Question text
How can we set a new cookie in JavaScript ? No
Question text
Only in Constructor How are the objects passed in JavaScript?
Feedback Select one:
Your answer is incorrect.
The correct answer is: No both by value and by reference

Question 29
by value
Correct
Mark 0.20 out of 0.20
by reference
Flag question

Question text none of these


How can you add your changes in the working directory, to the
Feedback
staging area ?
Your answer is correct.
Select one: The correct answer is: by reference

git push . Question 31


Correct
Mark 0.20 out of 0.20
git checkout .
Flag question
git add .
Question text
Feedback The XMLHttpRequest object provides the client with functionality
Your answer is correct. for transferring data between a client and a server.
The correct answer is: git add . Select one:
True
Question 30
False
Correct
Mark 0.30 out of 0.30 Feedback
The correct answer is 'True'.
Flag question
Question 32 Feedback
Correct Your answer is correct.
Mark 0.20 out of 0.20
The correct answer is: git push origin master
Flag question
Question 34
Question text Correct
A promise can be returned to another promise, creating a chain Mark 0.20 out of 0.20

of promises.
Flag question
Select one:
Question text
True
Which operator is used to assign a value to a variable?
False
Feedback Select one:
The correct answer is 'True'.
*
Question 33
Correct
.
Mark 0.20 out of 0.20

Flag question +
Question text
How can you send your local changes to the remote repository =
(master branch) ?
==
Select one:
Feedback
git pull origin master Your answer is correct.
The correct answer is: =
git commit origin master

git push origin master


b.
Arrow functions share the same Blank 1 as their surrounding
1432
code
Feedback c.
Your answer is correct. 1234

The correct answer is:


d.
Arrow functions share the same [this] as their surrounding
1423
code

Question 2 Feedback
Correct
Your answer is correct.
Mark 1.00 out of 1.00
The correct answer is: 1 4 3 2
Flag question
Question 3
Question text Correct
In what order will the numbers 1-4 be logged to the console Mark 1.00 out of 1.00
when the code below is executed?
Flag question

Question text
(function() {
Choose the correct statements from the following, in the
console.log(1);
context of client-server architecture
setTimeout(function(){console.log(2)}, 1000);
setTimeout(function(){console.log(3)}, 0); Select one or more:
console.log(4);
})(); a.
The server has direct access to the DOM
Select one:

a. b.
1342 The server is able to make requests to the client
c. DOM object
Several clients can connect to the same server
d.
d. Window object
One client can make requests to several servers
Feedback
Feedback Your answer is correct.
Your answer is correct.
The correct answer is: Window object
The correct answers are: Several clients can connect to the same
Question 5
server, One client can make requests to several servers
Correct
Mark 0.50 out of 0.50
Question 4
Correct
Mark 1.00 out of 1.00 Flag question

Question text
Flag question
Which of the following CSS properties DOES NOT influence
Question text the box model?
The localStorage and sessionStorage belongs to

Select one or more:

a.
Select one: outline

a.
b.
Hash object
border

b.
c.
Element object
padding

c.
d.
content The correct answer is: #object h2::first-letter

Question 7
e. Incorrect
margin Mark 0.00 out of 1.00

Feedback
Flag question
Your answer is correct.
Question text
The correct answer is: outline
Consider the following code snippet:
Question 6
Correct
Mark 1.00 out of 1.00
for (var i = 0; i < 5; i++) {
Flag question
var btn = document.createElement('button');
btn.appendChild(document.createTextNode('Button ' + i));
Question text btn.addEventListener('click', function(){ console.log(i); });
Which of the following two selectors has a higher CSS document.body.appendChild(btn);
specificity? }
What will be displayed after clicking on ‘Button 3’

Select one: Select one:

a. a.
body .item div h2::first-letter:hover 4

b. b.
#object h2::first-letter 2
Feedback
Your answer is correct. c.
3
Your answer is correct.
d.
The correct answers
5
are: document.getElementById(“myId”);, document.querySelector(“
Feedback #myId”);
Your answer is incorrect.
Question 9
The correct answer is: 5 Correct
Mark 0.50 out of 0.50
Question 8
Correct Flag question
Mark 1.00 out of 1.00
Question text
Flag question What will be displayed in the console after running the
Question text following snippet of code:
Which of the following statements will find an element by its var global = "global";
‘id’ attribute
function test() {
Select one or more:
if ( !global ) {
a. var global = "local";
document.querySelector(“#myId”); }

console.log( global );
b.
}
document.getElementById(“myId”);
test();
c.
document.querySelectorAll(“.myId”);
Select one:

d. a.
document.findElementById(“myId”); global
Feedback
b. A Class is a template/a blueprint that it’s used to create multiple
local objects with the same attributes and methods
Feedback Feedback
Your answer is correct. Your answer is correct.
The correct answer is: local The correct answers are: A Class is a template/a blueprint that it’s
used to create multiple objects with the same attributes and
Question 10
methods, “New” keyword followed by constructor function call will
Correct
Mark 1.00 out of 1.00
create an “instance” of that class, “Constructor function” is
mandatory when defining a Class
Flag question
Question 11
Question text Partially correct
Mark 0.67 out of 1.00
Check what you find true about “Class”(prototype based -
ES5) and “Instance” key words
Flag question
Select one or more:
Question text
Check what you find true about Static methods:
a.
An Instance is a mandatory attribute that we need to set on Select one or more:
“prototype” when defining a Class
a.
b. Can not be invoked on a class instance
“Constructor function” is mandatory when defining a Class
b.
c. Can not be invoked without instantiating the class
“New” keyword followed by constructor function call will create an
“instance” of that class c.
Can be invoked directly on a class name, without instantiating the
d. class
d.
Are used to run utilitary code that it’s not using an instance
attributes
Feedback
Your answer is partially correct.
You have correctly selected 2.
The correct answers are: Can be invoked directly on a class name,
without instantiating the class, Are used to run utilitary code that
it’s not using an instance attributes, Can not be invoked on a class
instance

You might also like