Question

HTML ASSIGNMENT Question 1: What is the value of the variable age after the following JavaScript...

HTML ASSIGNMENT

Question 1: What is the value of the variable age after the following JavaScript statements are executed?

var age = 30;

age = " age is: " + age + 5;

A. age is 30

B. age is + age + 5

C. age is 305

D. age is 35

Question 2:

Assume there is an external JS file named "addContent.js". This file is located in the same folder as the HTML document "addContent.html". In order to make this external JS work on the web page written by this HTML document, we can use the following link element  

<link href="addContent.js">

to add a reference to this external JS file in the HTML document.

A. True

B. False

Question 3:

Given the following variable declaration statement in JavaScript

var num;

What is the data type of this variable named color?

A. string

B. undefined

C. number

D. null

Question 4: let is a keyword in JavaScript to define local variable in block scope .(ECMA6 standards)

A. True

B. False

Question 5: int is the keyword used to define an integer variable in JavaScript.

A. True

B. False

Question 6: Given

var colors = [ 44.5, 'yellow', true ];

What is the value of colors[2] ?

A. true

B. undefined

C. 'yellow'

D. 44.5

0 0
Add a comment Improve this question Transcribed image text
Answer #1

1)  C. age is 305
2)  B. False
3)  B. undefined
4)  A. True
5)  B. False
6)  A. true


Add a comment
Know the answer?
Add Answer to:
HTML ASSIGNMENT Question 1: What is the value of the variable age after the following JavaScript...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Question 1: Given the following HTML code segment <p>While this is a <b> very basic HTML...

    Question 1: Given the following HTML code segment <p>While this is a <b> very basic HTML document </b>, it actually serves as a detailed example of the document object model. </p> How many text nodes will be added to the DOM tree to represent the structure of text content in this HTML code segment A. 1 B. 2 C. 3 D. 4 Question 2: Assume in an HTML document named “index.html”, the following <script> element is added <script src="grocery.js"></script> This...

  • JavaScript Question Which of the following 4 options is the correct answer for this question ?...

    JavaScript Question Which of the following 4 options is the correct answer for this question ? The following program has a problem. What is it? var a; var b = (a = 3) ? true : false The condition in the ternary is using the assignment operator. You can't define a variable without initializing it. The code is using the deprecated var keyword. You can't use a ternary in the right-hand side of an assignment operator.

  • <!DOCTYPE html> <html> <head> <!-- JavaScript 6th Edition Chapter 8 Hands-on Project 8-1 Author: Date:   ...

    <!DOCTYPE html> <html> <head> <!-- JavaScript 6th Edition Chapter 8 Hands-on Project 8-1 Author: Date:    Filename: index.htm --> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width,initial-scale=1.0"> <title>Hands-on Project 8-1</title> <link rel="stylesheet" href="styles.css" /> <script src="modernizr.custom.65897.js"></script> </head> <body> <header> <h1> Hands-on Project 8-1 </h1> </header> <article> <h2>New Account Information</h2> <form> <fieldset id="deliveryinfo"> <label for="fnameinput">First Name</label> <input type="text" id="fnameinput" name="fname" /> <label for="lnameinput">Last Name</label> <input type="text" id="lnameinput" name="lname" /> <label for="addrinput">Street Address</label> <input type="text" id="addrinput" name="address" /> <label for="cityinput">City</label> <input type="text" id="cityinput" name="city"...

  • I am trying to make it so that radio buttons when clicked execute a javascript file....

    I am trying to make it so that radio buttons when clicked execute a javascript file. I have to to have the exercises in external files. Here is what I have so far. I am reusing a script that was used to make radio buttons switch CSS files so I think I have to change the set attribute options. HTML <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> </head> <body> <p> 4.2 Output: The first 20 Fibonacci numbers, which are...

  • <!DOCTYPE HTML> <html lang="en"> <head>    <meta charset="utf-8"> <title>Plaid Scarf Selector</title>    <link rel="stylesheet" href="a3.css" />...

    <!DOCTYPE HTML> <html lang="en"> <head>    <meta charset="utf-8"> <title>Plaid Scarf Selector</title>    <link rel="stylesheet" href="a3.css" />    <script src="a3.js"> </script> </head> <body>    <section>        <h1> Plaid Scarf Selector </h1><br>        <p>Feels close to real cashmere (but costs a lot less).        Think of this scarf as the next best thing to wearing authentic cashmere.        Its microsueded fabric really is that soft. In fact, at first touch some        mistake if for the real...

  • <!DOCTYPE html> <html> <head> <!-- JavaScript 6th Edition Chapter 4 Hands-on Project 4-3 Author: Da...

    <!DOCTYPE html> <html> <head> <!-- JavaScript 6th Edition Chapter 4 Hands-on Project 4-3 Author: Date:    Filename: index.htm --> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Hands-on Project 4-3</title> <link rel="stylesheet" href="styles.css" /> <script src="modernizr.custom.05819.js"></script> </head> <body> <header> <h1> Hands-on Project 4-3 </h1> </header> <article> <div id="results"> <p id="resultsExpl"></p> <ul> <li id="item1"></li> <li id="item2"></li> <li id="item3"></li> <li id="item4"></li> <li id="item5"></li> </ul> </div> <form> <fieldset> <label for="placeBox" id="placeLabel"> Type the name of a place, then click Submit: </label> <input type="text" id="placeBox"...

  • This is my code so far: <!DOCTYPE html> <html> <head> <title>JavaScript is fun</title> <meta charset="utf-8" />...

    This is my code so far: <!DOCTYPE html> <html> <head> <title>JavaScript is fun</title> <meta charset="utf-8" /> </head> <body> <script type ="text/javascript"> //declare a variable and store text in it var x = "JavaScript is fun"; //write the variable 5 times document.write(x + x + x + x + x); //store 5 as string in variable x x = "5"; //store 3 as string in variable y var y = "3"; //write the value x + y to the document document.write("<br>");...

  • in the following java script code follow the instructions provided <!DOCTYPE html> <html> <head> <!-- JavaScript...

    in the following java script code follow the instructions provided <!DOCTYPE html> <html> <head> <!-- JavaScript 6th Edition Chapter 5 Hands-on Project 5-2 Author: Date:    Filename: index.htm --> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Hands-on Project 5-2</title> <link rel="stylesheet" href="styles.css" /> <script src="modernizr.custom.05819.js"></script> </head> <body> <header> <h1> Hands-on Project 5-2 </h1> </header> <article> <h2>Change of address form</h2> <form> <fieldset id="contactinfo"> <label for="addrinput"> Street Address </label> <input type="text" id="addrinput" name="Address" /> <label for="cityinput"> City </label> <input type="text" id="cityinput" name="City"...

  • As part of this assignment we are using the base Gallery HTML and writing JavaScript code...

    As part of this assignment we are using the base Gallery HTML and writing JavaScript code that will: 1) preload the images provided to us, 2) Create rollover functionality for each of the thumbnails in your image gallery 3) Use appropriate images found in the images folder. 4) Write developer comments to describe the variables being declared and explain the functions and logical blocks of JavaScript code pertaining to the gallery. I know it has to be an external JS...

  • Please help with this assignment section A. This question is from world wide web Info Sys Dev. Section A te HTML/JavaSc...

    Please help with this assignment section A. This question is from world wide web Info Sys Dev. Section A te HTML/JavaScript web page called sectiona.html, that has the fpllowing items: a. 2 text items labeled as "CAD Dollar" and "US Dollar", the first(CAD dollars) is enabled with id-"cad", while the later is disabled with id-us" b.1 button named as "convert". functionality: When the user clicks on the button, a JavaScript function named "convert" will be called to convert the value...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT