Let’s say you have 5 types of variables.
// 1: A number variable named 'a' with the value 123 var a = 123; // 2: A string variable named 'b' with the value "codesource" var b = "codesource"; // 3: A boolean variable named 'c' with the value true var c = true; // 4: An undefined variable named 'd' with the value undefined var d; // 5: A null variable named 'e' with the value null var e = null;
Static code analysis is a method of debugging by examining source code before a program is run. It's done by analyzing a set of code against a set (or multiple sets) of coding rules. Static code analysis and static analysis are often used interchangeably, along with source code analysis.