Top "Var" questions

var is a keyword in a number of programming languages.

If variable = number, do X, else do nothing

I wrote a jquery code that is going to expand certain elements on hover. I want the code to only …

jquery if-statement expand var
TypeError: Cannot destructure property `db` of 'undefined' or 'null'

I am getting a TypeError in my variable assignment for mongodb connection. Is there a workaround for this? //server.js …

node.js mongodb typeerror var destructuring
How to create LINQ Query from string?

I am new at LINQ and really need a help with some coding. At the moment, I have a string …

c# linq string var
linux chmod -R 777 /var/

By mistake I give via ssh with root privelege a chmod -R 777 /var/ in stead of chmod -R 777 var/ for …

linux var chmod 777
Kotlin function parameter: Val cannot be reassigned

I have written Red–black tree in Kotlin. Fun insertFixup restores balance after inserting new element (z: Node? is new …

pointers kotlin var
When to use var in Javascript

Maybe pretty easy question. Where should I use var keyword in JavaScript. It seems to me using it or not …

javascript var
static variables in Objective-C - what do they do?

I've seen a few posts discussing what a static variable is and I think I get it - but I'd …

objective-c static var
golang append() evaluated but not used

func main(){ var array [10]int sliceA := array[0:5] append(sliceA, 4) fmt.Println(sliceA) } Error : append(sliceA, 4) evaluated but not used I …

arrays go var
Uncaught TypeError: Cannot read property 'clientWidth' of null

I have a responsive wordpress theme. The menu is coded to hide when the screen size is bellow 740. However it …

jquery wordpress menu var screen-size
What is the PHP shorthand for: print var if var exist

We've all encountered it before, needing to print a variable in an input field but not knowing for sure whether …

php var isset