Skip to content

Tag: function

Javascript Changing inputted word based on function

Expected Output Example: Our word is Pokemon Pokemon (Regular word) P!k!m!n (Every 2nd letter is !) Nomekop (Reversed) pokemOn (Every 6th letter is uppercase) [Array of ASCII Values] I am sure that I have got reverse just fine but need help in figuring out uppercase and changing every 2nd letter and returning ASCII codes of the word. I would imagine

Using HTML and Javascript to make a concrete supplies calculator – Takes a value of both ____m3 and a select option (mpa) to give a total price

This is my first time asking a question on Stack Overflow so apologies if I get something wrong. I am currently building a web calculator for a concrete company. Here are the details of the inputs: There is a form with the following inputs: Input 1: Cubic Meters (m3) Input 2: Strength Input 1 takes a value between 0.1 m3

Checking same case in JavaScript

I was trying to solve a code wars kata called “Check same case”, and I’m not understanding what is wrong with my solution and why it doesn’t pass. The function should check: If either of the characters is not a letter, return -1 If both characters are the same case, return 1 If both characters are letters, but not the

javascript arguments passed as objects instead of strings

Please help me understand how this could happen: I think I’m passing simple strings to a Javascript function, but they are received as form objects! The first argument is the id of the form. The second argument is the name of an input. I’m expecting string string instead. Answer When you concatenate the variables into the onclick attribute, they will