CARVIEW |
Select Language
HTTP/2 200
content-type: text/html; charset=utf-8
date: Sun, 17 Aug 2025 09:26:42 GMT
permissions-policy: interest-cohort=()
strict-transport-security: max-age=31536000; includeSubDomains
server: nginx
cache-control: s-maxage=44935, max-age=0
x-powered-by: Next.js
etag: "ic1aipj16m8mvg"
content-encoding: gzip
x-xss-protection: 1; mode=block
x-content-type-options: nosniff
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'self' http: https: ws: wss: data: blob: 'unsafe-eval' 'unsafe-inline'; frame-ancestors 'self';
vary: Accept-Encoding
x-cache: Hit from cloudfront
via: 1.1 10c29330ece25deb52502cabf45f2502.cloudfront.net (CloudFront)
x-amz-cf-pop: BOM78-P9
x-amz-cf-id: VNvqRHKlx17T4OB2rS8bzaIH7CggN5QZIjWzXCfnwtOtqG6QnZkBsQ==
age: 17422
Quiz about JavaScript Course | Practice Quiz-3
JavaScript
JavaScript Course | Practice Quiz-3
Last Updated :
Discuss
Comments
Question 1
What will be the output of the following code?
<script>
let result = 0;
for (let i = 0; i < 5; i++) {
result += i;
}
document.write(result);
</script>
5
0
10
None of the above
Question 2
True or false: All keys in an object are strings.
- True
- False
- Depends on the Object type
- None of the above
Question 3
Given a collection of artists and lists of their songs, would you store the artist-song-list pairs in an Object or an Array?
- Object
- Array
- Function
- None of the above
Question 4
What will be the output of the following code?
JavaScript
<script>
if (5) {
document.write("I like peanuts");
}
</script>
- I like peanuts
- undefined
- nothing will be printed
- None of the above
Question 5
What will be the output of the following code?
JavaScript
<script>
let bar = 1;
foo = {};
foo: {
bar : 2;
baz : ++bar;
};
document.write(foo.baz + foo.bar + bar);
</script>
- NaN
- 5
- 4
- 1
Question 6
What will be the output of the following code?
< script>
document.write( 10 > 9 > 8 === true );
</ script>
true
false
1
0
Question 7
What will be the output of the following code?
JavaScript
<script>
document.write(String('Hello') == 'Hello');
</script>
- true
- false
- 1
- 0
Question 8
What will be the output of the following code?
JavaScript
<script>
document.write(( true + false ) > 2 + true );
</script>
- true
- false
- 1
- 0
Question 9
What will be the output of the following code?
JavaScript
<script>
document.write(Number('1') - 1 == 0);
</script>
- true
- false
- 1
- None of the above
Question 10
What will be the output of the following code?
JavaScript
<script>
document.write(NaN == NaN);
</script>
- true
- false
- 1
- 0
Tags:
There are 10 questions to complete.
Take a part in the ongoing discussion
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy