Can someone help with an issue in building a landing page?
I made the top half of my page using css grid, and the rest more or less with flex-box. But now I want the header which is part of the grid to stay sticky throughout the whole page
so far I have mad it 'position: sticky' 'top:0'
that helped, but it only makes it sticky in the grid section
@yozhikvtumane The tests have a time limit - you need to make your algorithm more efficient in order to pass the challenge.
Anton
@yozhikvtumane
I have no idea how to make it faster
Aditya
@ezioda004
@yozhikvtumane You're checking from the smallest number, you can do the opposite and start checking multiple of the largest number in the range.
Anton
@yozhikvtumane
wow man, how did you understand anything in my shitty code? =D
Aditya
@ezioda004
Because I used to write shittier code :D
Anton
@yozhikvtumane
@ezioda004
checking multiple of the largest number in the range.
You mean that instead of increasing t I should use something like the last one element in array of all numbers multiplied by itself?
Aditya
@ezioda004
@yozhikvtumane I mean you can reverse this loop, say the range is [13, 23]so start checking multiples of 23 with 22, 21 upto 13. If multiple of 23 isnt a multiple of say 21 then break the loop, get the next multiple and repeat the process.
Anton
@yozhikvtumane
Yeah, I did this, but still can't pass the tests @ezioda004
Has to do something with incrementing the value of multiple
Mark Kubik
@KUBIX90
Hi IM having a problem with converting a single digit value to a two digit for this digital timer im creating
_
Anton
@yozhikvtumane
@KUBIX90 Paste this to somewhere like jsbin.com please
i am facing a problem in my react-redux application. I am trying to extract elements using forEach loop from an array which is present in state but html view only get updated when i switch to another route and come back to same route. i want view to get updated without changing route. Anyone know solution?
Mark Kubik
@KUBIX90
@yozhikvtumane OK i will have a play around with it
Anton
@yozhikvtumane
@KUBIX90 forget this minutes: 5 , count seconds and display them in needed format with Date()
Mark Kubik
@KUBIX90
@yozhikvtumane Yeah so i was going to change that to baseDate: new Date(0, 0, 0, 0, 5, 0); and then minutes: data.baseDate.getMinutes()
minus the semi colon typo
although the above doesnt seem to work for some reason
says data is not defined
which is odd
Mark Kubik
@KUBIX90
I satill can; solve this, why would it be coming back as undefined?
i still
Anton
@yozhikvtumane
@KUBIX90 somthing like this let t = {
a: ()=> b = new Date(1970,0,1)
}
t.a()
Mark Kubik
@KUBIX90
is the new Date object not allowed tin another object or something?
Just don't why it has to be outside my data object
Christopher McCormack
@cmccormack
@KUBIX90 you can't reference a property within an object if it isn't yet defined
Mark Kubik
@KUBIX90
let data = {
baseDate: new Date (0,0,0,0,5),
minutes: data.baseDate.getMinutes(),
seconds: 0,
}
@cmccormack I just don't understand why data.minutes does not work in this instance
I would have thought the first line has been defined