Consider the following JavaScript code fragment:var greeting = function ( name ) {console.log ( name )}The best answer for what is wrong with this code is:Group of answer choices

Answers

Answer 1

Answer:

name is a reserved word in JS and cannot be used as an identifier

Explanation:

From the group of answer choices provided the only one that may be a problem would be using the word name as a parameter. Although name is not a reserved word per say in JS it is in HTML, and since JS targets HTML it could cause some errors. This however does not prevent this code from running correctly. JS does not require semicolons anymore, and the opening and closing braces for a body of code does not need to be on their own lines. Also, variable names are not Strings and do not need to be inside quotes, even for console.log()


Related Questions

Write a Racket two-way selection structure that will produce a list '(1 2 3) when the first element of a list named a_lst is identical to the atom 'a and an empty list otherwise. Note that you are NOT required to write a function definition!

Answers

Answer:

A

Explanation:

Which is not a MARKETING impact of technology?

Social
Cultural
Economic
Environmental

Answers

Answer:

the answer is environmental

g Add a throw statement to the processNumbers function that throws the message "An element in the list is not a number." if one of the elements in toProcess is not a number. Hint: The function isNaN() returns true if the parameter is not a number.

Answers

Answer and Explanation:

function processNumbers(alist){

var Ourarray= new array(alist);

Ourarray.foreach(

if(isNaN()){

Console.log( "An element in the list is not a number."};

break;

}

}

processNumbers(alist)

From the above, we have defined a function that takes an array parameter(the following array variable will make sure of that). We test each element in the array using foreach array function. The for each function runs the if statement and if isNan is true for each of the elements in the array.

write a programmimg code in c++ for school based grading system, the program should accept the subject in the number of students from a user and store their details in the array of type student(class) the student class you have:
1. number student name, index number remarks as variables of type string, marks as integer and grade as char.
2. avoid function called getData which is used to get student details
3. avoid function called calculate which will work on the marks and give the corresponding great and remarks as given below on
Marks 70-100 grade A remarks excellent Mark 60-69 Grade B remarks very good marks 50-59 grade C remarks pass maths 0-49 grade F remarks fail​

Answers

Answer:

The program is as follows:

#include <iostream>

#include <string>

using namespace std;

class Student{

string studName, indexNo, remarks; int marks;  char grade;

public:

 void getData(){

     cin.ignore();

     cout<<"ID: "; getline(cin,indexNo);

  cout<<"Name:"; getline(cin,studName);

  cout<<"Marks: ";cin>>marks;  }

 void calculate(){

  if(marks>=70 && marks<=100){

      remarks ="Excellent";       grade = 'A';   }

  else if(marks>=60 && marks<=69){

      remarks ="Very Good";       grade = 'B';   }

  else if(marks>=50 && marks<=59){

      remarks ="Pass";       grade = 'D';   }

  else{

      remarks ="Fail";       grade = 'F';   }

  cout << "Grade : " << grade << endl;

  cout << "Remark : " << remarks << endl;  }

};

int main(){

int numStudents;

cout<<"Number of students: "; cin>>numStudents;

Student students[numStudents];

for( int i=0; i<numStudents; i++ ) {

 cout << "Student " << i + 1 << endl;

 students[i].getData();

 students[i].calculate(); }

return 0;}

Explanation:

This defines the student class

class Student{

This declares all variables

string studName, indexNo, remarks; int marks;  char grade;

This declares function getData()

public:

 void getData(){

     cin.ignore();

Prompt and get input for indexNo

     cout<<"ID: "; getline(cin,indexNo);

Prompt and get input for studName

  cout<<"Name:"; getline(cin,studName);

Prompt and get input for marks

  cout<<"Marks: ";cin>>marks;  }

This declares funcion calculate()

 void calculate(){

The following if conditions determine the remark and grade, respectively

  if(marks>=70 && marks<=100){

      remarks ="Excellent";       grade = 'A';   }

  else if(marks>=60 && marks<=69){

      remarks ="Very Good";       grade = 'B';   }

  else if(marks>=50 && marks<=59){

      remarks ="Pass";       grade = 'D';   }

  else{

      remarks ="Fail";       grade = 'F';   }

This prints the grade

  cout << "Grade : " << grade << endl;

This prints the remark

  cout << "Remark : " << remarks << endl;  }

};

The main begins here

int main(){

This declares number of students as integer

int numStudents;

Prompt and get input for number of students

cout<<"Number of students: "; cin>>numStudents;

This calls the student object to declare array students

Student students[numStudents];

This is repeated for all students

for( int i=0; i<numStudents; i++ ) {

Print number

 cout << "Student " << i + 1 << endl;

Call function to get data

 students[i].getData();

Call function to calculate

 students[i].calculate(); }

return 0;}

Explain how data structures and algorithms
are useful to the use of computers in
data management (10 marks)


Explain how data structure and uses of computer in data management

Answers

Answer:

Data management is a important tool for data handling.

Explanation:

A good knowledge about the data stricture and data management is a prerequisite for working with codes and algorithms. It helps to identify the techniques for designing the algorithms and data storage in the system. It helps to find out the data hierarchy. Thereby allowing the data management in an efficient and effective way. It can increase the skills in computer programming

transmits data wirelessly via infrared (IR) light waves.
As
O A. RFID
B. Ethernet
O C. Bluetooth
D. IrDA
Reset Selection

Answers

Answer is
C - Bluetooth ( wireless via infrared )

what is the build in libary function to compare two strings?​

Answers

Answer:

strcmp() is a built-in library function and is declared in <string. h> header file. This function takes two strings as arguments and compare these two strings lexicographically.

Explanation:

Hope it helps

The Federal Financial Institutions Examination Council (FFIEC) developed the Cybersecurity Assessment Tool, which can be used as a self-assessment tool for identifying a bank or financial institution's cybersecurity maturity.
a. True
b. False

Answers

Answer:

a. True

Explanation:

Cyber security can be defined as preventive practice of protecting computers, software programs, electronic devices, networks, servers and data from potential theft, attack, damage, or unauthorized access by using a body of technology, frameworks, processes and network engineers.

The Federal Financial Institutions Examination Council (FFIEC) is an interagency of government that was established on the 10th of March, 1979. FFIEC is saddled with the responsibility of developing the Cybersecurity Assessment Tool, which is then used as a self-assessment tool for identifying the maturity of a bank's or financial institution's cybersecurity.

Programming languages categorize data into different types. Identify the characteristics that match each of the following data types.

a. Can store fractions and numbers with decimal positions
b. Is limited to values that are either true or false (represented internally as one and zero).
c. Is limited to whole numbers (counting numbers 1, 2, 3, ...)

Answers

Answer:

a) Integer data type.

b) Real data type.

c) Boolean data type.

Explanation:

a) Integer data type is limited to whole numbers (counting numbers 1, 2, 3…….).

b) Real data type can store fractions and numbers with decimal positions (such as dollar values like $10.95).

c) Boolean data type is limited to values that are either true or false (represented internally as 1 and 0 respectively).

d. Which of the following computer has complex system? i. Hybrid computer ii. IBM computer iii. Mainframe computer iv. Analog computer​

Answers

Answer:

Hybrid computer has complex system

Which option is used in order to configure switchboards for a complex database?
Switchboard Manager
Global Options
Quick Search
Database Formatter
worth 100 points

Answers

Answer:

switch board manager

Explanation:

2.
The force of impact is

Answers

Answer:

lực ( Tiếng Anh : force ) là bất kỳ ảnh hưởng nào làm một vật thể chịu sự thay đổi, hoặc là ảnh hưởng đến chuyển động, hướng của nó hay cấu trúc hình học của nó.

Explanation:

a. Download the attached �Greetings.java� file.
b. Implement the �getGreetings� method, so that the code prompts the user to enter the first name, the last name, and year of birth, then it returns a greetings message in proper format (see the example below). The �main� method will then print it out. Here is an example dialogue with the user:
Please enter your first name: tom
Please enter your last name: cruise
Please enter your year of birth: 1962
Greetings, T. Cruise! You are about 50 years old.
Note that the greetings message need to be in the exact format as shown above (for example, use the initial of the first name and the first letter of the last name with capitalization).
c. Submit the final �Greetings.java� file (DO NOT change the file name) online.

Answers

Answer:

Code:

import java.util.*;  

public class Greetings  

{  

   public static void main(String[] args)  

   {        

       Scanner s = new Scanner(System.in);  

       System.out.println(getGreetings(s));  

   }  

   private static String getGreetings(Scanner console)  

   {          

   System.out.print("Please enter your first name: ");  

   String firstName=console.next();    

   char firstChar=firstName.toUpperCase().charAt(0);  

   System.out.print("Please enter your last name: ");  

   String lastName=console.next();    

   lastName=lastName.toUpperCase().charAt(0)+lastName.substring(1, lastName.length());  

   System.out.print("Please enter your year of birth: ");  

   int year=console.nextInt();  

   int age=getCurrentYear()-year;  

   return "Greetings, "+firstChar+". "+lastName+"! You are about "+age+" years old.";  

   }  

   private static int getCurrentYear()  

   {  

       return Calendar.getInstance().get(Calendar.YEAR);  

   }  

}

Output:-

Why use LinkedIn Sales Navigator?

Answers

Answer:

Salespeople and marketers waste tons of their time finding the right leads.

A lot of people think that LinkedIn Sales Navigator is only for advanced search but there are plenty of other perks as well. Its features and capabilities help you find the right people so you don’t waste your time and energy on manual searching.

Using sales navigator, you get access to a lot more features that are not present in the free version. You get limited searching with the free version.

With this LinkedIn automation tool, you can:

Search target audience with advanced filters Get recommendations for sales leads and track all the reports Use advanced filters anywhere else on the platform Get specific keyword mentions, job alerts, etc.

You are the IT administrator for a small corporate network. You have recently experienced some problems with devices on the workstation in the Support Office. In this lab, your task is use Device Manager to complete the following:______.
The new network card you installed isn't working as expected (speed is only 1 Mbps). Until you can figure out what the problem is, disable the Broadcom network adapter and enable the Realtek network adapter. To make sure the network adapter has the latest drivers, update the driver for the Realtek network adapter by searching Microsoft Update. You recently updated the driver for your video card. However, the system experiences periodic crashes that you suspect are caused by the new driver. Roll back the driver to a previous version. Move the Ethernet cable to the integrated network port on the motherboard.

Answers

Answer:

I will fix it by my mind by thinking

Based on the above scenario, the steps to take is given below\

What is the management about?

The first thing is to Right-click Start and click on Device Manager and then you expand Network adapters.

Later you Disable the network adapter  and then Update the driver .

Learn more about Ethernet from

https://brainly.com/question/1637942

#SPJ2

python is an example of a low level programming language true or false?​

Answers

False- python is an example of a high level language. Other high levels are c++, PHP, and Java

what is programming language?​

Answers

Answer:

A programming language is a formal language comprising a set of strings that produce various kinds of machine code output. Programming languages are one kind of computer language, and are used in computer programming to implement algorithms. Most programming languages consist of instructions for computers

Answer:

The artificial languages that are used to develop computer programs are called programming language . hope this help!

In a file called amortizedAnalysis.pdf, please provide answers to the following questions: How many cost units are spent in the entire process of performing 40 consecutive append operations on an empty array which starts out at capacity 5, assuming that the array will double in capacity each time a new item is added to an already full dynamic array

Answers

Answer:

a

Explanation:

sdfghj

Write a program named lastname_firstname_cities.py that works with information about large cities. Your program will open the cities.txt downloadfile. Each line in the file has the name of a city, its country, and its population. The first few lines of the file look like this:

Answers

Answer and Explanation:

Open your text editor and open new file. Save new file file as lastname_firstname_cities.py. The program will open the file cities.txt downloadfile hence :

dfile= open(cities.txt, "r")

If we write this into our lastname_firstname_cities.py file it will open our cities.txt downloadfile in read mode and text mode(by default unless we specify binary mode which is for images)

cpp Write a program that first gets a list of integers from input. The input begins with an integer indicating the number of integers that follow. Then, get the last value from the input, which indicates a threshold. Output all integers less than or equal to that last threshold value. Ex: If the input is:

Answers

Answer:

#include <iostream>

int main() {

 // The length of the list

 int l;

 // The array containing the numbers

 int *list;

 // Threshold, last value in array

 int thresh;

 

 // Read in first value and create an array with the size of that value

 scanf("%d", &l);

 list = (int*) malloc(l * sizeof(int));

 

 for(int i = 0; i < l; i++) {

   scanf("%d", &list[i]);

 }

 thresh = list[l - 1];

 // Print the values

 for(int i = 0; i < l - 1; i++) {

   if (list[i] <= thresh) {

     printf("%d ", list[i]);

   }

 }

 

 printf("\n");

 free(list);

}

Explanation:

The program assumes at least two values are provided. The length of the list and the threshold.

We first read in an integer, and find out how many more integers we need to read. We create an array with the appropriate size, and loop through to fill the array with values. We know the last value is the threshold, and so we do one more loop to compare the values in the array with the threshold.

What is the definition of: a computer network? data communications? telecommunications? a local area network? a personal area network? a metropolitan area network a wide area network? network management? convergence? g

Answers

Answer:

The answer is below

Explanation:

1. Computer Network: this is a system of interconnection of computers and computing devices that utilizes wires or radio waves over certain reachable locations.

2. Telecommunications: this is known to be the system or combination of telephones device and networks that transmit telephone signals.

3. A local area network: often referred to as LAN, is a system of networks that covers a smaller area usually within a room, floor, building, or campus.

4. Personal area network: often referred to as PAN, this is a network that covers few distances, usually between wireless devices like PDAs, laptops, and other devices.

5. Metropolitan area network: often referred to as MAN, this is a system of the network that serves quite a larger area, usually between that serve an area of 1 to 30 miles radius. For example, a typical city.

6. Wide area network: often referred to as WAN, this is a system of a large network that covers a large area such as parts of states, many states, countries, and the world at large.

7. Network management: this is defined to be a process of designing, installing, and supporting a computer network, such as computer hardware and software

8. Convergence: this is known to be a connection, combination, and integration of two or more computer technologies in a single device or system for operation.

Which of the given assertion methods will return true for the code given below? Student student1 = new Student(); Student student2 = new Student(); Student student3 = student1;
The Student class is as follows.
public class Student{
private String name;
}
a. assertEquals(student1, student2);
b. assertEquals(student1, student3);
c. assertSame(student 1, student3);
d. assertSame(student1, student2);

Answers

Answer:

The true statements are :

A. assertEquals(student1,student2)  

C. assertSame(student1,student3)

Explanation:

AssertEquals() asserts that the objects are equal, but assertSame() asserts that the passed two objects refer to the same object or not, if found same they return true, else return false.

Methods are collections of named code segments that are executed when evoked

The assertion method that will return true for the given code is: assertEquals(student1,student2)  

The code segment is given as:

Student student1 = new Student();

Student student2 = new Student();

Student student3 = student1;

In Java, the assertEquals() method returns true if two objects have equal values.

Assume student1 and student2 have equal values, the statement assertEquals(student1,student2) will return true

Read more about java methods at:

https://brainly.com/question/15969952

An integer is said to be a perfect number if the sum of its divisors, including 1 (but not the number itself), is equal to the number.

a. True
b. False

Answers

true

explanation: bc it is

Give three reasons to use a hard drive as mass storage.

Answers

Answer:

Every computer – whether it's a tower desktop or laptop – is equipped with an internal hard drive. The hard drive is where all your permanent computer data is stored. Whenever you save a file, photo, or software to your computer, it's stored in your hard drive

Explanation:

Backups and Archives. ...

Media Libraries. ...

Large Capacity Storage. ...

NAS Drives and Security. ...

RAID Arrays. ...

Other Uses.

How many cost units are spent in the entire process of performing 40 consecutive append operations on an empty array which starts out at capacity 5, assuming that the array will grow by a constant 2 spaces each time a new item is added to an already full dynamic array

Answers

Answer:

Explanation:

260 cost units, Big O(n) complexity for a push

Help Pls
I need about 5 advantages of E-learning​

Answers

Answer:

Explanation:

E-learning saves time and money. With online learning, your learners can access content anywhere and anytime. ...

E-learning leads to better retention. ...

E-learning is consistent. ...

E-learning is scalable. ...

E-learning offers personalization.

Answer:

E- learning saves time and money

E-learning makes work easier and faster

E- learning is convenient

E- learning is consistent

E- learning is scalable

Explanation:

when you learn using the internet, you save a lot of time by just typing and not searching through books

Which Windows installation method requires the use of Windows deployment services (WDS)?
1. Network Installation
2. Repair Installation
3. Bootable flash drive installation
4. Unattended installation​

Answers

Answer:

1. Network Installation

Explanation:

Given

Options (1) to (4)

Required

Which requires WDS for installation

WDS are used for remote installations where users do not have to be physically present before installations can be done; in other words, it is necessary for network based installations.

Of all the given options, (a) is correct because without WDS, network installation cannot be done.

In the home tab under the paragraph group of options what are you unable to do?

Answers

Im not sure what this is?? Maybe add a picture or more context! ❤️

The Curiosity Rover has recently landed on Mars and likes to send Twitter updates on its progress. If a tweet is posted 10 minutes after it was sent, how far is Curiosity from Earth? (Assume there is no network lag.)

Answers

Answer:

1.8 * 10^11 m

Explanation:

Given that :

Time taken for tweet to me posted after been sent, t = 10 minutes

t in seconds :

60 seconds = 1 minute

10 minutes = (10 * 60) = 600 seconds

Tweet sent will br transmitted at the speed of light, c = 3 * 10^8 m/s

Recall :

Speed = distance / time

Distance = speed * time

Distance of Curiosity from Earth = (3 * 10^8 * 600)

Distance of curiosity from earth = 1.8 * 10^11 m

Uses of a computer load speaker

Answers

Answer:

A computer speaker is an output hardware device that connects to a computer to generate sound. The signal used to produce the sound that comes from a computer speaker is created by the computer's sound card.

I hope this will help you if not then sorry have a great day :)

Other Questions
Glaston Company manufactures a single product using a JIT inventory system. The production budget indicates that the number of units expected to be produced are 195,000 in October, 203,500 in November, and 200,000 in December. Glaston assigns variable overhead at a rate of $0.70 per unit of production. Fixed overhead equals $152,000 per month. Compute the total budgeted overhead for October. If 12 out of 30 fruits are oranges, how many oranges fruits will there be per 100 fruits total? Suppose g(x) = f( x +2) - 3. Which statement best compares the graph of g(x) with the graph of f(x)? A. The graph of g(x) is shifted 2 units left and 3 units up. B. The graph of g(x) is shifted 2 units right and 3 units down. C. The graph of g(x) is shifted 2 units left and 3 units down. D. The graph of g(x) is shifted 2 units right and 3 units up. Find the length of the side CD in the pentagon ABCDE.A) 42 unitsB) 12 unitsC) 4 unitsD) 410 units Ive never really understood 8th-9th grade volume, could use some help A water bottling company has purchased the rights to bottle 960 liters of spring water a month from the local spring.How many 4-liter bottles can they produce a month? Step One: Anatomical DevelopmentsMatch the following anatomical developments (A-J) with the number where they occur on the Hominin Anatomy Phylogeny (below).A. decreased prognathism, moderate sized molars, phalanges not curved (derived), Found in South Africa, still relatively small brain (-450cc)B. canine reduction, lower jaw tooth row shape intermediate between parallel and parabolic, have footprints explicitly displaying bipedalpatterns, curved phalangesC. further brain expansion, decrease in teeth size, decrease in brow ridges, flattening of the face, mental eminence, vertical foreheadD. megadontia complex (huge molars, jaws, and chewing muscles), slight increase in cranial capacity (410-530cc)E. femur and pelvis indicate capable of bipedalismF. brain expansion, megadontia reduction, smaller less projecting face, smaller jawsG. occipital bun common, retromolar space, robust postcrania, relatively short limbsH. further brain expansion, reduction in teeth, face, and jaws, increased brow ridges, increased body size1. loss of honing complex, obligate bipedalism, curved phalanges (primitive), parallel tooth row shapeJ. foramen magnum position indicates likely capable of bipedalism Demonstrate the the flow of oxygen (on inhalation) and carbon dioxide (on exhalation). Which of the perspectives of science have you been exposed to the least? please help me with geometry Write a rule to describe the transformation.A. reflection across y=xB. rotation 90 clockwise about the originC. rotation 180 about the originD. rotation 90 counterclockwise about the origin The tangent ration! helpp!! A local cinema reduced its ticket prices by 15% which means a ticket now costs 10.88. how much was a ticket before the reduction? 13. The Cyclone Coaster has 16cars. Some of them hold 2passengers and some hold 3passengers. If there is room for36 people altogether, how manycars hold 3 passengers? Find the equation of the line through point (-4,1) and parallel to y= -1/2x-2. write a letter to your headmaster of your school suggesting three ways by which we can improve education at the junior high school level 14% of all Americans live in poverty. If 35 Americans are randomly selected, find the probability thata. Exactly 3 of them live in poverty.b. At most 7 of them live in poverty.c. At least 4 of them live in poverty.d. Between 1 and 8 (including 1 and 8) of them live in poverty. I need help to find m = 40. Try not to think too big. Do something that will make the lives of the needy more ______ and happy. observe a farming system in your neighbourhood and write short notes on it.