Skip to main content
-4 votes
3 answers
110 views

I wrote the algorithm below and asked an AI to evaluate my solution. //TESTS: console.log(firstNonRepeatingCharacter('abacabaz')) //c console.log(firstNonRepeatingCharacter('aabbccdeefgghijj')) //d ...
claudiopb's user avatar
  • 1,094
1 vote
1 answer
162 views

I hope this is not a silly question. Why when I use for (let property in myObject)... property is recognized by typescript as "string" instead of "keyof typeof myObject"? Is there ...
Daniel Cruz's user avatar
  • 2,428
-2 votes
1 answer
41 views

I'm new to React. I know that comments should be received as an object, so I tried using a for...in loop to iterate over them. However, when I attempted to use the for...in loop, I encountered an ...
Dipesh's user avatar
  • 17
1 vote
1 answer
240 views

import SwiftUI import MapKit import CoreLocation struct ContentView: View { @State private var position: MapCameraPosition = .userLocation(fallback: .automatic) @State private var hazards: [(...
Jacklan's user avatar
  • 11
0 votes
1 answer
41 views

Still learning JS and confused over this The below code gives out undefined as output when it should be "v" - am I missing something or using for-in over a string is the issue let s="...
shivansh sharma's user avatar
0 votes
3 answers
72 views

I tried looping names of front-end developers nested inside of objects(refer to code) and when I printed it to console it says display is not defined. var employees = { sales: { ...
huz3y's user avatar
  • 21
-3 votes
3 answers
148 views

I'm new to JavaScript and am learning about for...in loops and objects right now. I'm practicing with the following example: let spaceship = { crew: { captain: { name: 'Lily', ...
Will Barrett's user avatar
0 votes
1 answer
94 views

I'm new to rust and i'm building an implementation of the grep command to learn this language. I'm trying to create a function to match the search query in a case insensitive way, but i'm having ...
Alex Licata's user avatar
0 votes
2 answers
94 views

I've a dataset of firms with year from 1960-1989 and month (1-12) that looks like this. PERMNO. Year Month 10057 1960 1 10057 1960 2 10057 1960 3 10057 1960 4 10057 1960 5 10057 1960 6 10057 1960 7 ...
Jingy's user avatar
  • 1
0 votes
1 answer
45 views

I have a object named user where one of the properties is skills and im trying to find a user who have the maximum no. of skills. let maximum = 0; let name; for (const user in users) { const len = ...
s-chuck's user avatar
  • 33
0 votes
1 answer
916 views

I try to do iteration on object on nodejs using for in, on my local it's working just fine. but when i deploy it to web service, it pass an error. but when i tried on my local it work just fine const ...
Muzani Pamasarsa's user avatar
0 votes
3 answers
420 views

As part of a practice challenge for a bootcamp, I've been asked to: 'Fix the jumbled string values - replace them all with versions that are all lowercase' I've tried several approaches based on ...
maximusmd's user avatar
0 votes
2 answers
250 views

Asked to: 'Iterate through the staff nested inside the restaurant object, and add their names to the staffNames array.' My solution keeps getting rejected with this error: 'Use a declaration keyword ...
maximusmd's user avatar
1 vote
1 answer
52 views

something is bugging me at the moment about For In Loops. I understand how to use them but what I can't seem to get my head around is.. Well, in this example: const tree = { name: 'Oak', ...
James's user avatar
  • 127
2 votes
3 answers
352 views

I am confused with the following code. func allTestsPassed(tests: [Bool]) -> Bool { for test in tests { if test == false { return false } } return true } If ...
Ryu Hiroyama's user avatar

15 30 50 per page
1
2 3 4 5
41