97 Answered Questions for the topic javascript

How to remove a specific property from an object ?

I have a user object having the following properties:let user = {  name: "john",  pin: 45,  gender: "Male",  updated: "Yes",  active: true,};Now I want to remove pin completely from the object. So... more

01/03/20

I'm at X,Y - target at X,Y - How calculate angle to face target?

Hello there! I am at 10, 25 (x,y) target at 5, -10 (x,y) I'm facing 0º How can I calculate the correct angle to face the target?About this question: I am building a script on javascritp, so I... more

01/01/20

How to check if an Object has a Property

Suppose we have the following javascript object: var... more

12/14/19

Adding operable links in HTML5 within a drop down menu.

Hello,I am currently designing a ten page website composing of HTML5, JavaScript, and Css3. I have my index .html page and my services.html page. However, I have created a drop down menu of each... more

11/21/19

Simple Adder HTML JavaScript

Create the form structure shown in Figure 2, below. Write a JavaScript function according to the following requirements. A user should be allowed to enter two numbers in text boxes. When a user... more

11/21/19

JavaScript Form Validation

4. Create the form structure shown in Figure 2, below. Write a JavaScript function according to the following requirements. A user should be allowed to enter his/her Fist name in a text box and... more

11/19/19

Javascript functions

Write a JavaScript function to calculate difference of square values of two numbers passed as function arguements and to display the absolute value of it in an alert box.<script> function... more

11/19/19

Javascript functions

Write a JavaScript function to calculate difference of square values of two numbers passed as function arguements and to display the absolute value of it in an alert box.<script> function... more

11/17/19

CSS - Selecting the first bold word of all paragraphs

write the required external CSS rules for the following : Set the font size and font style , of the first bold word of all the paragraphs in a document into 14px and italic respectively.

11/17/19

JavaScript Form Validation

Question :Create the form structure shown below and write a JavaScript function satisfy the followingrequirements. The Name and the email address are required fields while entering data. Number... more

11/13/19

Coding help on Google Docs Add-on

So I'm in the midst of trying to learn code (which I'm kind of bad at). I'm trying to code something to alert me when someone edits a shared google doc. I know that there's this google add-on thing... more

10/18/19

Javascript Coding Help

Create an array that stores the names of five dogs.Using a loop, evaluate an array index for even numbers. If the value is even, then output "dog name is a good dog", and if it is an odd number,... more

10/02/19

Javascript Help!!!!

1) Create a file called dayOfWeek.js 2) Write javaScript code that will display the current Day of the Week and the next day. ex) "Today is Wednesday and tomorrow is Thursday" if it is Wednesday.... more

08/05/19

How can I dynamically attach a scripting label to a newly created item in basil.js?

Is there a way to add scripting labels to PageItems that are created in code, i.e. without using the Scripting Label panel? My code looks like this: var tf = b.text("Hello World", 200, 200,... more

07/29/19

How do I create a modal service with AngularJS?

I'm trying to make a service that's polymorphic based upon what mode is specified in the URL. If the char param in the route is set to 'p', I want to use a PresentMode service. If the char param is... more

07/29/19

How can I team up two MVC frameworks without having them fight each other?

I'm creating a CRUD-based web project, and am thinking about using a server side MVC framework (such as CodeIgniter or Laravel) in tandem with a client side MVC framework (such as AngularJS). Is... more

07/29/19

How and where to test if the JSON request objects generated by the front-end is valid?

We have built a complex Angular application that sends multiple HTTP request to a REST service that is also built in house. Since both the frontend and the backend is being developed in parallel,... more

07/11/19

How Could One Write This Basic PAINT Statement in JavaScript?

In BASIC there is a command called PAINT that looks like this: PAINT (column, row), color, color-stop It takes x/y coordinates as a starting place and begins filling it and the surrounding... more

06/19/19

Why does javascript accept commas in if statements?

I stumbled across some javascript syntax that seemed like it should produce a parse error of some kind but doesn't: if (true, true) {console.log('splendid')} else {console.log('horrid')} //... more

06/19/19

Why does 2 && 3 results in 3 (javascript)?

When I type in browser's console: console.log(2 && 3) it results always with second number (in this case 3): 3 Can someone explain me why?

06/19/19

Can someone explain this JavaScript auto executing function?

var foo = (function(){ var x = 0; return function(){return x++;}; })() Why the var x = 0 expression only runs once is my biggest misunderstanding about this.

06/19/19

Determine if two strings are similar in Javascript?

Let's say I have two strings, is there any way to check if they are at least 90% similar? var string1 = "theBoardmeetstoday,tomorrow51"; var string2 = "Board meets today, tomorrow"; Thanks, Tegan more

06/19/19

Can !a!=!!b^!!-!a||!+!a|!c return anything other than 1?

I was playing the Javascript game with somebody and we were having fun making ridiculous and absurd expressions to make our inputs get a particular output. This little charming one ... more

06/06/19

Is window really global in Javascript?

Take this piece of Javascript in a browser: <script> console.log(window.someThing); var x = 12; function foo() { window.otherThing = x; } </script>Inside... more
1 3 4

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.

OR

Find an Online Tutor Now

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