157 Answered Questions for the topic javascript

JavaScript Question

How do I put the output on the second line?Intended output(example)Enter·the·number·up·to·which·you·would·like·to·look·for·perfect·numbers:500↵Looking·for·perfect·numbers·from·1·to·500↵... more

JavaScript Question

6.24 (Perfect Numbers) An integer number is said to be a perfect number if its factors, including 1 (but not the number itself), sum to the number. For example, 6 is a perfect number, because 6 = 1... more

JavaScript Problem

5-15) (Triangle Printing Program) Write an application that displays the following patterns separately, one below the other. The use should be asked to enter an integer that will determine how... more

JavaScript Question

(Triangle Printing Program) Write an application that displays the following patterns separately, one below the other. The use should be asked to enter an integer that will determine how many lines... more

JavaScript Problem

Write an application that displays the following patterns separately, one below the other. The use should be asked to enter an integer that will determine how many lines of the pattern are printed... more

Java HW(Need help ASAP)

Write a program to prompt student for their name then test 1 grade, test 2 grade, test 3 grade. Calculate the average grade and print a statement such as:“Student name your grades are:Test1 = ... more


I am currently struggling with why not all the curly brackets are closed as shown below

let correctGuess = false; const number = 6; const guess = prompt('Guess a number between 1 and 10.'); if ( +guess === number ) { correctGuess = true; } else if ( +guess < number ) { const... more
Javascript Html Css


How do i Apply to become a tutor?

I want to help and teach students with all their homework, test, quizzes or upcoming exams.

Java code needed

Java code needed! someone please help me with this code!Write a program whose input is a character and a string, and whose output indicates the number of times the character appears in the string.... more


Recursion and Stack Overflow Question

Recursion uses something called the “call stack” where recursive calls to functions are stacked. Explain this using a specific example. When might there be a stack overflow?
Javascript Array Dynamic Content


Dynamically generate innerHTML elements from a response array (Javascript)

****This is a part of my code: var arr1 = response; console.log(arr1);****This is the response/console logged arr1:{ "channels": { "1620184778889x527731420801269760": [ { ... more
Javascript Html Css


What is the shortest way to create a working clock in Javascript?

What is the shortest way to create a working clock in Javascript? I want to create a clock that shows hour, minute, and second. Basically, the user to see his local time on the browser. Please show... more


Javascript wont load image

I have a button with onclick = "generateCat()" in my html file. When I click the button running a web browser the image will not... more
Javascript Firefox Elements Jquery


In firefox console how can learn the inspector console to trigger click events on webpages.

Are there any good resources for Javascript console triggers of buttons. So far I learned I can press cmd+shift+c in mac to get element by clicking on the webpage this allows me to press esc to... more

Computer Science: Help using React Native, Axios, and Express API together

Please help. I am trying to use Axios to bind my React-Native app to an Express API. When I try to run the app on a server I get this message in my terminal: [Error: Network Error] . I have tried... more


Write a program using JavaScript to find length of array.


Discord.js random message after x amount of time (Code Correction)

I need to have my discord bot send a random message every 1.5 hours (1 second here for testing) and so far I used the following code but it did not work: 'use strict'; const { Client,... more
Javascript Html


Beginner JavaScript / HTML Question

Hi, I just started learning JavaScript and HTML. I'm trying to make a message appear in the span with ID "message" when a button is clicked two different ways, first using JavaScript and also using... more

How to complete code

/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */package... more

Modify the Cage class to implement Comparable.

The definition of the Comparable interface can be found here. Remember that Comparable has one abstract method, int compareTo(T o). Two Cages can be compared based on their size obtained via... more

Write a function in Java that takes in the int[] array, sorts it using bubble sort, then returns back the sorted array.

Examples: bubbleSort({4,7,1}) -> {1,4,7} bubbleSort({80,6,6,8,2}) -> {2,6,6,8,80} public int[] bubbleSort(int[] array) { int n = array.length; int temp = 0; }Finish the rest


How do I put the prices for the toppings, pizza size, and drinks in HTML and Javascript code?I used the radio button for the pizza toppings (Pineapple, Cheese, and Black Olives) and pizza sizes... more
Javascript Html Coding Parameters


Redirect to other page if there are no parameters in url, otherwise stay at current page.

I need to redirect from my website if there are no parameters in the url with javascript, html. (redirect with html,js)For example, if a page on my site was example.com/page and if there were... more


Simple Calculator

 Create a simple Java GUI application that will simulate the calculator. Numbers from 0-9 should be present and should perform a basic arithmetic operation such as Addition, Subtraction,... more

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.


Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.