Posts

Showing posts from February, 2024

Variables in Postman

What is a variable? This is the basic question to learn when you start programming. I am not going to dive deep into the programming concepts. Let me explain the variables used in Postman. What is a Variable in Postman? A data unit, that stores a value and it is dynamic based on the data type we use.  Should be written as Key: Value pair (Example: name= "Test"; num=1;) Provides the facility to access the value without manual effort every time. There are 5 different scopes of variables used in Postman. Global Variables Environment Variables Collection Variables Data Variables Local Variables These variable scopes are specially designed to refer to values in the Postman tool. Global Variable:          When the variable is assigned globally, it has all the privileges of accessing anywhere in the workspace such as the Environment, Collection. Environment Variable:          It is limited within the specific environment where you can access data between collections. Collection Vari

Understanding of parseInt() funtion in JavaScript

Image
parseInt() function in javascript is used to parse a string element and returns as an integer.  Syntax: It takes two parameters: String : The string to be converted to an integer. Radix (optional) : An integer between 2 and 36 that represents the base of the numeral system used in the string. This is an optional parameter, and if not specified, JavaScript assumes the following: If the string begins with "0x" or "0X", it is parsed as a hexadecimal number. (Example is given at last). It is always better to specify by the programmers for clarity and understanding.                                             Syntax: parseInt(String,radix) or parseInt(String)   Otherwise, it is parsed as a decimal number.                                              Syntax: parseInt(String)    Let us see the examples for a better understanding Radix: var num3 = "0x12345" ; var num4 = "0X12345" ; var num5 = "0123" ; var num6 = "0012345" ; consol