
JavaScript
Question Assignments for PRG-160
This is where I'll be putting some of my JavaScript Assignment questions! I want to get to know the section break on carrd so I can use it on my final practicals (for any class so that I can spice up my work!)
iop-401 | Intro. to JS Objects
(2) Questions for assignment: iop-401 | Intro. to JS Objects
Intro to JS Objects #1
A ____ primitive value is a value that has no properties or methods.
Why is this incorrect?
Note: Click on the reasons why they're not correct for the links to sources.
This is incorrect because:
Since you picked A, B or D
Why is this correct?
Note: Click on the reasons why this is correct for the link to source.
This is correct because:
Intro to JS Objects #2
Whis attribute instructs browsers to download a URL instead of navigating to it?
Why is this incorrect?
Note: Click on the reasons why they're not correct for the links to sources.
This is incorrect because:
Since you picked B, C or D:
Why is this correct?
Note: Click on the reasons why this is correct for the link to source.
This is correct because:
Since you picked A:
iop-401.1 | Functions
Functions #1
Complete this paragraph.
A1 are one of the building blocks in Javascript and a Javascript procedure, which is a set of A2 that performs a task or calculates a A3 .
Results #1
If you picked A:
Correct!
If you picked B or C:
Incorrect...
Here is the full source from where the information came from!
Functions #2
A JavaScript function is a:
Results #2
If you picked B:
Correct! Source
If you picked A or C:
Incorrect!
The "A" option defines what JSON is. Source
The "C" option defines what a PHP array is. Source
iop-401.1 | JS Timing Events
Timing Events #1
Complete the code!
What's missing?
<button onclick="setTimeout(myFunction, 3000)">Try it!</button>
<script>
function myFunction(){
alert('Hello')
}
</script>
Results #1
The Correct Answer was a:
<button onclick="setTimeout(myFunction, 3000)">Try it!</button>
<script>
function myFunction(){
alert('Hello');
}
</script>
There should be a semicolon after ('Hello'); in the alert function.
Source
Timing Events #2
Complete the sentence!
Provide the correct answer!
A1 allows you to run a function once after the interval of time while A2 allows to run a function regularly with the interval between the runs.
Results #2
The Correct Answer was B:
setTimeout allows you to run a function once after the interval of time while setInterval allows to run a function regularly with the interval between the runs.
iop-401 | Intro. to the Browser Object Model