Hangman game Javascript
I am trying to make a hangman game using JavaScript. I've come at impasse and can't find any answers online. I'm trying to create a function for when the letter is clicked, it checks to see if its in the…
I am trying to make a hangman game using JavaScript. I've come at impasse and can't find any answers online. I'm trying to create a function for when the letter is clicked, it checks to see if its in the…
I have some nested for loops that take a while to run, so I want to display a progress bar. The problem is that this is not an inherently async process, it is a block of code with 3 nested…
Caesar Cipher is just changing each letter shifting it by 13 places. I know i can do it with indexOf, but i tried to do it with arrays and a for..loop but I'm having problems with it, can someone tell…
I'm trying to solve this exercise: Write a JavaScript code that asks the user for a number and then print the number of times that number appears in an array. I'm doing it with parseFloat so I can get the…
I'm trying to get all the possible combinations of pairs const arr = [1,2,3]; const groups = []; for (let i = 0, i < arr.length, i++) { for (let j = i + 1, j < arr.length, j++) {…
I'm trying to create a "Buy Again" list in Shopify. My coding skills are very basic, but I know enough to get by. I can loop through a customer's previous 10 orders, but that's not really what I want. An…
I have an array of Objects (Jerseys) and some are Authentic (true) and some are Replicas (Authentic: False) const Jerseys = [{"Player":"Shaq","Team":"Miami Heat","Sport":"Basketball","Authentic":true,"Price":325,"Year":2007,"jerseyNum":32},{"Player":"Michael Jordan","Team":"Chicago Bulls","Sport":"Basketball","Authentic":true,"Price":300,"Year":1992,"jerseyNum":23},{"Player":"Ken Griffey","Team":"Seattle Mariners","Sport":"Baseball","Authentic":true,"Price":300,"Year":1989,"jerseyNum":24},{"Player":"Tim Hardaway","Team":"Miami Heat","Sport":"Basketball","Authentic":false,"Price":135,"Year":1996,"jerseyNum":10},{"Player":"Dan Marino","Team":"Miami Dolphins","Sport":"Football","Authentic":true,"Price":300,"Year":1994,"jerseyNum":13},{"Player":"Dan Marino","Team":"Miami Dolphins","Sport":"Football","Authentic":true,"Price":300,"Year":1990,"jerseyNum":13},{"Player":"Tim Anderson","Team":"Miami Marlins","Sport":"Baseball","Authentic":false,"Price":125,"Year":2021,"jerseyNum":15},{"Player":"Will Smith","Team":"Bel-Air","Sport":"Basketball","Authentic":false,"Price":135,"Year":2007,"jerseyNum":41},{"Player":"Pete Rose","Team":"Cinncinatti Reds","Sport":"Baseball","Authentic":true,"Price":300,"Year":1975,"jerseyNum":14},{"Player":"Derrick Rose","Team":"Chicago Bulls","Sport":"Basketball","Authentic":true,"Price":300,"Year":2008,"jerseyNum":1},{"Player":"Unknown","Team":"Miami…
I have a very simple React app to better understand how useEffect works. This app has the App component with useEffect hook. Inside this hook, I simulate a heavy synchronous task using a for loop. I am curious about the…
I want to design an application with buttons. The 'odd numbers' button will contain a for loop inside such that when clicked, odd numbers will appear on the screen. I'd like to do similarly for even numbers. > class _MyHomePageState…
I'm trying to output array elements infinitely. I've already found another way to do this, but can you help me understand why the first element doesn't output in this code after the first iteration of array? li = [1, 2,…