JavaScript C13
Question 1 (1 point)
Which property of the Number object returns the largest positive value that JavaScript can represent?
Question 1 options:
MIN_VALUE |
|
MAX_VALUE |
|
POSITIVE_INFINITY |
|
NEGATIVE_INFINITY |
Save
Question 2 (1 point)
If a numerical operation returns a number greater than the largest possible JavaScript value, it returns
Question 2 options:
NaN |
|
-NaN |
|
Infinity |
|
-Infinity |
Save
Question 3 (1 point)
In JavaScript, NaN represents
Question 3 options:
a value that isn’t a number |
|
the largest positive value that can be represented |
|
the smallest positive value that can be represented |
|
infinity |
Save
Question 4 (1 point)
What method of the Number object returns the string for a number with base 10 as the default?
Question 4 options:
the toString() method |
|
the round() method |
|
the toPrecision() method |
|
the toFixed() method |
Save
Question 5 (1 point)
What method of the Number object returns a string with the number rounded to the specified number of decimal places?
Question 5 options:
the toString() method |
|
the round() method |
|
the toPrecision() method |
|
the toFixed() method |
Save
Question 6 (1 point)
What method of the Math object can be used to return the largest value from the values that are passed to it?
Question 6 options:
the Math.max() method |
|
the Math.ceil() method |
|
the Math.pow() method |
|
the Math.abs() method |
Save
Question 7 (1 point)
What method of the Math object can be used to generate and return a decimal number that’s greater than or equal to 0 but less than 1?
Question 7 options:
the Math.round() method |
|
the Math.random() method |
|
the Math.floor() method |
|
the Math.sqrt() method |
Save
Question 8 (1 point)
The length property of the String object returns
Question 8 options:
the number of words in the string |
|
the index of the first character in the string |
|
the index of the last character in the string |
|
the number of characters in the string |
Save
Question 9 (1 point)
What method of the String object searches the string for an occurence of the specified search string?
Question 9 options:
the charAt() method |
|
the search() method |
|
the indexOf() method |
|
the substring() method |
Save
Question 10 (1 point)
Which of the following statements is NOT a valid way to create a date object named birthday?
Question 10 options:
var birthday = "12/2/1978"; |
|
var birthday = new Date(); |
|
var birthday = new Date("12/2/1978"); |
|
var birthday = new Date(1978, 11, 2); |
Question 1
Answer:
MAX_VALUE
Question 2
Answer:
Infinity
Question 3
Answer:
a value that isn’t a number
Question 4
Answer:
the toFixed() method
Question 5
Answer:
the toPrecision() method
Question 6
Answer:
the Math.max() method
Question 7
Answer:
the Math.random() method
Question 8
Answer:
the number of characters in the string
Question 9
Answer:
the indexOf() method
Question 10
Answer:
var birthday = "12/2/1978";
JavaScript C13 Question 1 (1 point) Which property of the Number object returns the largest positive...
Which of the following functionality can NOT be developed using JavaScript only? Question 1 options: A monthly calendar Adding some numbers A live clock showing date and time A synchronous chat room with multiple people from different places Showing different text based on time of the day. Question 2 (0.5 points) Saved In the following JavaScript statement, what is the value of course[3]? var course = new Array(4203, 89, 95, 77, 5443); Question 2 options: 4203 77 95 null 5443...
Can someone please help me with this javascript - Javascript - do at least 10 of the following questions below ----------------------------------------------------------------------------------- Create an HTML file that takes in input and carries out of the following functions and manipulates the DOM to show the outcome. Please put the question itself as a comment above each answer. Use either JavaScript, jQuery, or both (but know the difference!). ----------------------------------------------------------------------------------- 1. Fibonacci Define function: fib(n) Return the nth number in the fibonacci sequence. 2....
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...
only in javascript 1.Define a method named roleOf that takes the name of an actor as an argument and returns that actor's role. Ex: roleOf("Keira Knightley") returns "Elizabeth Swann". Hint: A method may access the object's properties using the keyword this. Ex: this.cast accesses the object's cast property. var movie = { // Code will be tested with different actors and movies name: "Pirates of the Caribbean: At World's End", director: "Gore Verbinski", composer: "Hans Zimmer", cast: { "Johnny Depp":...
QUESTION 1 JSON stands for (each letter has textbox) one java script object notation 10 points aved QUESTION 2 All of the following are true for JSON, EXCEPT.. a. uses conventions of markup languages similar to HTML, XML Ob. "easy" for humans to read and write c. standardized as ECMA-262 d. "easy" for computer algorithms to parse and generate . language independent text format for data f. based on subset of JavaScript 10 points Save Answer QUESTION 3 JSON organizes...
Create a simple Java class for a Month object with the following requirements: This program will have a header block comment with your name, the course and section, as well as a brief description of what the class does. All methods will have comments concerning their purpose, their inputs, and their outputs One integer property: monthNumber (protected to only allow values 1-12). This is a numeric representation of the month (e.g. 1 represents January, 2 represents February,...
JAVA PROGRAMMING A complex number is a number in the form a + bi, where a and b are real numbers and i is V-1. The numbers a and b are known as the real part and imaginary part of the complex number, respectively. You can perform addition, subtraction, multiplication, and division for complex numbers using the following formulas: a + bi + c + di = (a + c) + (b + di a + bi - (c +...
DIRECTIONS FOR THE WHOLE PROJECT BELOW BigInt class The purpose of the BigInt class is to solve the problem using short methods that work together to solve the operations of add, subtract multiply and divide. A constructor can call a method called setSignAndRemoveItIfItIsThere(). It receives the string that was sent to the constructor and sets a boolean variable positive to true or false and then returns a string without the sign that can then be processed by the constructor to...
JAVA QUESTION: *******THE QUESTION:******** /** numberOfNodesAtDepth * * Returns the number of nodes with depth == d * Precondition: none * * param: d the depth to search for * * hint: use a recursive helper function * * ToDo 4 */ public int numNodesAtDepth(int d) { return -1; } **********USEFUL CODE FROM THE ASSIGNMENT:*********** public class simpleBST<Key extends Comparable<Key>, Value> { private Node root; ...
Question 3 (1 point) Which contains the largest total number of atoms? O 1 mol C2H6 O2 mol CH4 O 3 mol H2O 06 mol He All contain the same number of atoms