Asked 1 years ago
21 Jul 2023
Views 305
ruby-rails

ruby-rails posted

Uncaught ReferenceError: variable is not defined

i got this error many time in code

Uncaught ReferenceError: variable is not defined

its because i had variable which have dynamic value which obtain after some event so it remain undefined so what to do

if(sizenew){
}

where sizenew is element child length generate after some dom ready
so what to do now
Post Answer