<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Variables Archives - scmGalaxy</title>
	<atom:link href="https://www.scmgalaxy.com/tutorials/tag/variables/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.scmgalaxy.com/tutorials/tag/variables/</link>
	<description>A Platform for Software Engineers</description>
	<lastBuildDate>Sat, 21 Feb 2026 07:13:46 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1</generator>
	<item>
		<title>Understanding Parameters: Use Cases, Architecture, Workflow, and Getting Started Guide</title>
		<link>https://www.scmgalaxy.com/tutorials/understanding-parameters-use-cases-architecture-workflow-and-getting-started-guide/</link>
					<comments>https://www.scmgalaxy.com/tutorials/understanding-parameters-use-cases-architecture-workflow-and-getting-started-guide/#respond</comments>
		
		<dc:creator><![CDATA[Vijay K]]></dc:creator>
		<pubDate>Mon, 16 Jun 2025 12:37:00 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[CodingConcepts]]></category>
		<category><![CDATA[functions]]></category>
		<category><![CDATA[Parameters]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[ProgrammingBestPractices]]></category>
		<category><![CDATA[SoftwareArchitecture]]></category>
		<category><![CDATA[SoftwareDevelopment]]></category>
		<category><![CDATA[TechTutorial]]></category>
		<category><![CDATA[Variables]]></category>
		<guid isPermaLink="false">https://www.scmgalaxy.com/tutorials/?p=12793</guid>

					<description><![CDATA[<p>What are Parameters? Parameters are variables used in programming that allow you to pass data or values into functions, methods, [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/understanding-parameters-use-cases-architecture-workflow-and-getting-started-guide/">Understanding Parameters: Use Cases, Architecture, Workflow, and Getting Started Guide</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-image size-large"><img fetchpriority="high" decoding="async" width="1024" height="683" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2025/06/image-114-1024x683.png" alt="" class="wp-image-12804" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2025/06/image-114-1024x683.png 1024w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2025/06/image-114-300x200.png 300w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2025/06/image-114-768x512.png 768w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2025/06/image-114.png 1536w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<hr class="wp-block-separator has-alpha-channel-opacity">



<h3 class="wp-block-heading">What are Parameters?</h3>



<p class="wp-block-paragraph"><strong>Parameters</strong> are variables used in programming that allow you to pass <strong>data</strong> or <strong>values</strong> into functions, methods, or procedures to enable them to perform tasks with varying inputs. When you define a function or method, you can specify parameters in its declaration, which are placeholders for the values that will be passed when the function is called. Parameters act as input data for the function and allow it to process different values each time it is executed.</p>



<p class="wp-block-paragraph">Parameters are essential in making <strong>functions</strong> reusable and dynamic. By defining parameters, functions can perform tasks based on the values passed to them, without having to hard-code specific data. They serve as a critical component of function-based programming and are used in many programming languages such as <strong>Python</strong>, <strong>Java</strong>, <strong>JavaScript</strong>, <strong>C</strong>, <strong>C++</strong>, and more.</p>



<p class="wp-block-paragraph">In many cases, <strong>parameters</strong> are also referred to as <strong>arguments</strong>, though there is a subtle distinction between the two:</p>



<ul class="wp-block-list">
<li><strong>Parameter</strong>: The variable in the function definition.</li>



<li><strong>Argument</strong>: The actual value passed to the parameter when the function is called.</li>
</ul>



<p class="wp-block-paragraph">For example, consider a simple function that adds two numbers:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
def add_numbers(a, b):
    return a + b

</pre></div>


<p class="wp-block-paragraph">Here, <code>a</code> and <code>b</code> are parameters. When you call the function with actual values, those values are arguments:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
add_numbers(3, 5)

</pre></div>


<p class="wp-block-paragraph">In this case, <code>3</code> and <code>5</code> are arguments passed to the <code>a</code> and <code>b</code> parameters of the <code>add_numbers</code> function.</p>



<hr class="wp-block-separator has-alpha-channel-opacity">



<h3 class="wp-block-heading">What are the Major Use Cases of Parameters?</h3>



<p class="wp-block-paragraph">Parameters are used in a wide range of programming scenarios. Below are the major use cases:</p>



<h4 class="wp-block-heading">1. <strong>Dynamic Function Behavior</strong></h4>



<p class="wp-block-paragraph">Parameters allow functions to behave dynamically by taking input values that determine the function&#8217;s behavior. Instead of hardcoding values, parameters allow the same function to be executed with different inputs, making the function reusable for different scenarios.</p>



<p class="wp-block-paragraph">Example:</p>



<ul class="wp-block-list">
<li>A <strong>sum function</strong> can be reused for adding any two numbers, and the numbers are passed as parameters to define the function&#8217;s behavior.</li>
</ul>



<h4 class="wp-block-heading">2. <strong>Encapsulation of Complex Operations</strong></h4>



<p class="wp-block-paragraph">Functions that perform <strong>complex operations</strong> (e.g., calculations, data processing) often require different values for each operation. Parameters encapsulate the input data, allowing the function to work on a variety of inputs without modifying the core logic.</p>



<p class="wp-block-paragraph">Example:</p>



<ul class="wp-block-list">
<li>A <strong>file processing function</strong> can take parameters for the file path, encoding, and output format, enabling the same function to process different files.</li>
</ul>



<h4 class="wp-block-heading">3. <strong>Code Reusability</strong></h4>



<p class="wp-block-paragraph">Parameters increase <strong>code reusability</strong> by allowing functions to work with different inputs and perform similar operations without writing multiple versions of the same function.</p>



<p class="wp-block-paragraph">Example:</p>



<ul class="wp-block-list">
<li>A <strong>data sorting function</strong> can be reused with different datasets and sort orders by passing the dataset and order type as parameters.</li>
</ul>



<h4 class="wp-block-heading">4. <strong>Configuration of Functions</strong></h4>



<p class="wp-block-paragraph">Parameters allow functions to be configured and customized without changing their internal logic. This allows greater flexibility, as parameters control aspects of the function&#8217;s execution, like <strong>timeouts</strong>, <strong>limits</strong>, and <strong>environment settings</strong>.</p>



<p class="wp-block-paragraph">Example:</p>



<ul class="wp-block-list">
<li>A <strong>server connection function</strong> might take parameters for the server address, port, and authentication details, allowing the function to connect to various servers with different configurations.</li>
</ul>



<h4 class="wp-block-heading">5. <strong>Control Flow and Decision Making</strong></h4>



<p class="wp-block-paragraph">Parameters can control the <strong>flow of a program</strong>, allowing developers to implement decision-making logic within functions based on the input values. This can help in implementing <strong>conditional operations</strong> and <strong>branching logic</strong>.</p>



<p class="wp-block-paragraph">Example:</p>



<ul class="wp-block-list">
<li>A <strong>payment processing function</strong> could take a <code>payment_method</code> parameter to determine whether the payment is processed via credit card, PayPal, or another method.</li>
</ul>



<h4 class="wp-block-heading">6. <strong>Interfacing with External Systems</strong></h4>



<p class="wp-block-paragraph">In distributed systems or when working with external APIs, parameters serve as the mechanism to pass data between different services, applications, or system layers. They act as <strong>data carriers</strong> that transport necessary information across systems.</p>



<p class="wp-block-paragraph">Example:</p>



<ul class="wp-block-list">
<li>An <strong>API request</strong> might take parameters like <code>user_id</code>, <code>action_type</code>, and <code>time_range</code> to request specific data from a server.</li>
</ul>



<hr class="wp-block-separator has-alpha-channel-opacity">



<h3 class="wp-block-heading">How Parameters Work Along with Architecture?</h3>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="683" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2025/06/image-115-1024x683.png" alt="" class="wp-image-12805" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2025/06/image-115-1024x683.png 1024w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2025/06/image-115-300x200.png 300w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2025/06/image-115-768x512.png 768w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2025/06/image-115.png 1536w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p class="wp-block-paragraph">In programming, parameters fit into the overall architecture of functions, methods, and procedures. Below is an explanation of how parameters are used within the architecture of a function and the general software architecture.</p>



<h4 class="wp-block-heading">1. <strong>Function Declaration</strong></h4>



<p class="wp-block-paragraph">When you define a function or method, you specify the parameters within the function’s <strong>declaration</strong>. These parameters act as placeholders for the values that will be passed when the function is invoked.</p>



<p class="wp-block-paragraph">Example in Python:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
def greet_user(username):
    print(f&quot;Hello, {username}!&quot;)

</pre></div>


<p class="wp-block-paragraph">Here, <code>username</code> is a parameter that is used in the function <code>greet_user</code>. When you call the function, you pass an <strong>argument</strong> to this parameter:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
greet_user(&quot;Alice&quot;)

</pre></div>


<h4 class="wp-block-heading">2. <strong>Function Call</strong></h4>



<p class="wp-block-paragraph">When a function is invoked, you pass values, known as <strong>arguments</strong>, to the parameters in the function definition. These arguments replace the parameters with specific data when the function executes. The argument values are assigned to the corresponding parameters, and the function uses them to perform its operations.</p>



<h4 class="wp-block-heading">3. <strong>Parameter Scope</strong></h4>



<p class="wp-block-paragraph">The scope of a parameter is <strong>local</strong> to the function or method in which it is defined. This means the parameter can only be used inside the function or method where it is declared. Once the function execution is complete, the parameter value is discarded.</p>



<p class="wp-block-paragraph">Example:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
def calculate_area(radius):
    area = 3.14 * radius * radius  # radius is a parameter
    return area

# radius is not accessible outside the function

</pre></div>


<h4 class="wp-block-heading">4. <strong>Default Parameters</strong></h4>



<p class="wp-block-paragraph">Some programming languages allow <strong>default parameter values</strong>, which are used when no argument is passed to the function. This makes parameters optional.</p>



<p class="wp-block-paragraph">Example in Python:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
def greet_user(username=&quot;Guest&quot;):
    print(f&quot;Hello, {username}!&quot;)

greet_user()  # Uses the default value &quot;Guest&quot;
greet_user(&quot;Alice&quot;)  # Uses the provided argument &quot;Alice&quot;

</pre></div>


<h4 class="wp-block-heading">5. <strong>Varied Number of Parameters (Arbitrary Arguments)</strong></h4>



<p class="wp-block-paragraph">Some languages support functions that accept a <strong>variable number of parameters</strong>, often using a special syntax. In Python, this is achieved using <code>*args</code> for non-keyword arguments or <code>**kwargs</code> for keyword arguments.</p>



<p class="wp-block-paragraph">Example in Python:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
def sum_numbers(*args):
    return sum(args)

print(sum_numbers(1, 2, 3))  # Output: 6

</pre></div>


<p class="wp-block-paragraph">Here, <code>*args</code> allows the function to accept an arbitrary number of arguments.</p>



<hr class="wp-block-separator has-alpha-channel-opacity">



<h3 class="wp-block-heading">Basic Workflow of Parameters</h3>



<p class="wp-block-paragraph">The basic workflow for using parameters in functions follows a few simple steps:</p>



<ol class="wp-block-list">
<li><strong>Define Parameters in Function Declaration</strong>
<ul class="wp-block-list">
<li>Define the function and specify the parameters inside the parentheses.</li>
</ul>
</li>



<li><strong>Call the Function and Pass Arguments</strong>
<ul class="wp-block-list">
<li>When calling the function, pass values (arguments) that correspond to the parameters defined in the function.</li>
</ul>
</li>



<li><strong>Use Parameters Inside the Function</strong>
<ul class="wp-block-list">
<li>Inside the function, use the parameter values to perform computations or execute specific tasks based on the input.</li>
</ul>
</li>



<li><strong>Return Results (If Applicable)</strong>
<ul class="wp-block-list">
<li>The function can return a value based on the parameters, which can be used elsewhere in the program.</li>
</ul>
</li>



<li><strong>Handle Optional or Variable Parameters</strong>
<ul class="wp-block-list">
<li>Define default values for parameters or use variable argument techniques (like <code>*args</code> or <code>**kwargs</code>) to make the function more flexible.</li>
</ul>
</li>
</ol>



<hr class="wp-block-separator has-alpha-channel-opacity">



<h3 class="wp-block-heading">Step-by-Step Getting Started Guide for Parameters</h3>



<p class="wp-block-paragraph">Here’s a step-by-step guide to help you understand and implement parameters in your programs:</p>



<h4 class="wp-block-heading">Step 1: <strong>Define a Simple Function</strong></h4>



<p class="wp-block-paragraph">Start by creating a simple function that accepts a single parameter:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
def say_hello(name):
    print(f&quot;Hello, {name}!&quot;)

</pre></div>


<p class="wp-block-paragraph">This function takes <code>name</code> as a parameter and prints a greeting.</p>



<h4 class="wp-block-heading">Step 2: <strong>Call the Function with an Argument</strong></h4>



<p class="wp-block-paragraph">Now, call the function and pass an argument to the parameter:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
say_hello(&quot;Alice&quot;)

</pre></div>


<p class="wp-block-paragraph">This will output:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
Hello, Alice!

</pre></div>


<h4 class="wp-block-heading">Step 3: <strong>Add More Parameters</strong></h4>



<p class="wp-block-paragraph">You can add more parameters to the function to make it more versatile. For example, let’s define a function to calculate the area of a rectangle:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
def calculate_area(length, width):
    area = length * width
    return area

</pre></div>


<h4 class="wp-block-heading">Step 4: <strong>Call the Function with Multiple Arguments</strong></h4>



<p class="wp-block-paragraph">Pass multiple arguments to the function:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
result = calculate_area(5, 3)
print(result)  # Output: 15

</pre></div>


<h4 class="wp-block-heading">Step 5: <strong>Use Default Parameters</strong></h4>



<p class="wp-block-paragraph">Let’s add a default value to a parameter. This makes it optional:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
def greet_user(username=&quot;Guest&quot;):
    print(f&quot;Hello, {username}!&quot;)

</pre></div>


<p class="wp-block-paragraph">You can call it with or without an argument:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
greet_user()  # Output: Hello, Guest!
greet_user(&quot;Bob&quot;)  # Output: Hello, Bob!

</pre></div>


<h4 class="wp-block-heading">Step 6: <strong>Use Variable-Length Arguments</strong></h4>



<p class="wp-block-paragraph">If you want to accept an arbitrary number of arguments, use <code>*args</code> or <code>**kwargs</code>:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
def add_numbers(*args):
    return sum(args)

print(add_numbers(1, 2, 3, 4))  # Output: 10

</pre></div>


<p class="wp-block-paragraph">This allows you to pass any number of arguments to the function.</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/understanding-parameters-use-cases-architecture-workflow-and-getting-started-guide/">Understanding Parameters: Use Cases, Architecture, Workflow, and Getting Started Guide</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/understanding-parameters-use-cases-architecture-workflow-and-getting-started-guide/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Immediately Invoked Function Expression (IIFE)</title>
		<link>https://www.scmgalaxy.com/tutorials/immediately-invoked-function-expression-iife/</link>
					<comments>https://www.scmgalaxy.com/tutorials/immediately-invoked-function-expression-iife/#respond</comments>
		
		<dc:creator><![CDATA[rajeshkumar]]></dc:creator>
		<pubDate>Mon, 02 Aug 2021 12:23:35 +0000</pubDate>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[functions]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[objects]]></category>
		<category><![CDATA[Variables]]></category>
		<guid isPermaLink="false">https://www.scmgalaxy.com/tutorials/?p=7261</guid>

					<description><![CDATA[<p>IIFE (Immediately Invoked Function Expression) is a JavaScript function that runs as soon as it is defined.It is a design [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/immediately-invoked-function-expression-iife/">Immediately Invoked Function Expression (IIFE)</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">IIFE (Immediately Invoked Function Expression) is a JavaScript function that runs as soon as it is defined.<br>It is a design pattern which is also known as Self-Executing Anonymous Function and contains two major parts. The first is the anonymous function with lexical scope enclosed within the Grouping Operator (). This prevents accessing variables within the IIFE idiom as well as polluting the global scope.<br>The second part is creating the immediately executing function expression (), through which the JavaScript engine will directly interpret the function.</p>



<script src="https://gist.github.com/vijaypk376/7ed30bd6b4a8b0b95c893a58230a0ca8.js"></script>



<h2 class="wp-block-heading">Immediately Invoked Function Expression (IIFE)</h2>



<ul class="wp-block-list"><li>Avoid Creating Global variable and Functions</li><li>As it doesn‟t define variable and function globally so there will be no name conflicts</li><li>Scope is limited to that particular function</li></ul>



<h2 class="wp-block-heading">Pass by Value</h2>



<ul class="wp-block-list"><li>JavaScript arguments are passed by value: The function only gets to know the values, not the argument&#8217;s locations.</li><li>If a function changes an argument&#8217;s value, it does not change the parameter&#8217;s original value.</li><li>Changes to arguments are not visible (reflected) outside the function.</li></ul>



<h2 class="wp-block-heading">Pass by reference</h2>



<ul class="wp-block-list"><li>In JavaScript, object references are values.</li><li>Because of this, objects will behave like they are passed by reference:</li><li>If a function changes an object property, it changes the original value.</li><li>Changes to object properties are visible (reflected) outside the function.</li></ul>



<p class="wp-block-paragraph"></p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/immediately-invoked-function-expression-iife/">Immediately Invoked Function Expression (IIFE)</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/immediately-invoked-function-expression-iife/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Define Function expression in JavaScript</title>
		<link>https://www.scmgalaxy.com/tutorials/define-function-expression-in-javascript/</link>
					<comments>https://www.scmgalaxy.com/tutorials/define-function-expression-in-javascript/#respond</comments>
		
		<dc:creator><![CDATA[rajeshkumar]]></dc:creator>
		<pubDate>Sat, 31 Jul 2021 12:34:09 +0000</pubDate>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Arguments]]></category>
		<category><![CDATA[functions]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Variables]]></category>
		<guid isPermaLink="false">https://www.scmgalaxy.com/tutorials/?p=7237</guid>

					<description><![CDATA[<p>Function Expression When we create a function and assign it to a variable, known as a function expression. Note: &#8211; [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/define-function-expression-in-javascript/">Define Function expression in JavaScript</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">Function Expression</h2>



<p class="wp-block-paragraph">When we create a function and assign it to a variable, known as a function expression.</p>



<script src="https://gist.github.com/vijaypk376/46c4a99f1f13703e3dbd8184a2f42ec3.js"></script>



<p class="wp-block-paragraph">Note: &#8211;</p>



<ul class="wp-block-list"><li><strong>You can‟t call function expression before the function definition.</strong></li><li><strong>Function expressions in JavaScript are not hoisted, unlike function declarations.</strong></li></ul>



<h2 class="wp-block-heading">Anonymous Functions</h2>



<p class="wp-block-paragraph">Anonymous functions allow the creation of functions that have no specified name.</p>



<ul class="wp-block-list"><li><strong>Can be stored in a Variable</strong></li><li><strong>Can be Returned in a Function</strong></li><li><strong>Can be pass in a Function</strong></li></ul>



<script src="https://gist.github.com/vijaypk376/20232b8266da50f6efc4ae61268160aa.js"></script>



<h2 class="wp-block-heading">Store Anonymous Function in Variable</h2>



<script src="https://gist.github.com/vijaypk376/1df0d78e0c6c098d87780a117c1a9460.js"></script>



<h2 class="wp-block-heading">Passing Anonymous Function as Argument</h2>



<script src="https://gist.github.com/vijaypk376/ab7b9a35baebd661acb57b3bcb4d2b83.js"></script>



<h2 class="wp-block-heading">Returning Anonymous Function</h2>



<script src="https://gist.github.com/vijaypk376/0146f165d15c123704a7e7a8d904ec71.js"></script>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/define-function-expression-in-javascript/">Define Function expression in JavaScript</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/define-function-expression-in-javascript/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How does JavaScript scope work?</title>
		<link>https://www.scmgalaxy.com/tutorials/how-does-javascript-scope-work/</link>
					<comments>https://www.scmgalaxy.com/tutorials/how-does-javascript-scope-work/#respond</comments>
		
		<dc:creator><![CDATA[rajeshkumar]]></dc:creator>
		<pubDate>Sat, 31 Jul 2021 12:13:29 +0000</pubDate>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Global]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Variables]]></category>
		<guid isPermaLink="false">https://www.scmgalaxy.com/tutorials/?p=7234</guid>

					<description><![CDATA[<p>Variable Scope JavaScript has two scopes: &#8211; Global Local Global Scope A variable that is declared outside a function definition [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/how-does-javascript-scope-work/">How does JavaScript scope work?</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading"><strong>Variable Scope</strong></h2>



<p class="wp-block-paragraph">JavaScript has two scopes: &#8211;</p>



<ul class="wp-block-list"><li><strong>Global</strong></li><li><strong>Local</strong></li></ul>



<h2 class="wp-block-heading">Global Scope</h2>



<p class="wp-block-paragraph">A variable that is declared outside a function definition is a global variable, and its value is accessible and modifiable throughout your program. In a web browser, global variables are deleted when you close the browser window (or tab) but remain available to new pages loaded into the same window.</p>



<script src="https://gist.github.com/vijaypk376/c68b12b5f3a0b23aa8e7eca7249fae9b.js"></script>



<h2 class="wp-block-heading">Local Scope</h2>



<p class="wp-block-paragraph">A variable that is declared inside a function definition is local. It is created and destroyed every time the function is executed, and it cannot be accessed by any code outside the function. Inside a function, if a variable has not been declared with var it is created as a global variable.</p>



<script src="https://gist.github.com/vijaypk376/b5fc9aafd382023f3f8d73566a8cc803.js"></script>



<h2 class="wp-block-heading">Local Scope</h2>



<p class="wp-block-paragraph">If there is a function inside a function the inner function can access outer function‟s variables but the outer function can not access inner function‟s variables. Function arguments (parameters) work as local variables inside functions.</p>



<h2 class="wp-block-heading">Block Scope</h2>



<p class="wp-block-paragraph">Variables declared with var do not have block scope.</p>



<script src="https://gist.github.com/vijaypk376/bc60fd19190634293c62fa5b80a548f5.js"></script>



<h2 class="wp-block-heading">Block Scope</h2>



<p class="wp-block-paragraph">Identifiers declared with let and const do have block scope.</p>



<script src="https://gist.github.com/vijaypk376/dfd4e1170e7409581f15e693eb660e10.js"></script>



<h2 class="wp-block-heading">Variable Hoisting</h2>



<p class="wp-block-paragraph">Hoisting is JavaScript&#8217;s default behavior of moving declaration to the top of the function, if defined in a function, or the top of the global context, if outside a function.</p>



<script src="https://gist.github.com/vijaypk376/9ef97bc4c430b9dad808185ee64df7c8.js"></script>



<script src="https://gist.github.com/vijaypk376/16f6be6d8143fdaec7ff87839003fe21.js"></script>



<h2 class="wp-block-heading">Variable Hoisting</h2>



<p class="wp-block-paragraph">A variable can be used before it has been declared. Only variable declarations are hoisted to the top, not variable initialization.</p>



<script src="https://gist.github.com/vijaypk376/949b08c361c97ee4912fccdfe40ee3ff.js"></script>



<script src="https://gist.github.com/vijaypk376/d93670b96f5e555e58ddf9b75b3eda78.js"></script>



<h2 class="wp-block-heading">Closure</h2>



<p class="wp-block-paragraph">A closure is a function having access to the parent scope. It preserves the data from the outside.</p>



<p class="wp-block-paragraph">A closure is an inner function that has access to the outer (enclosing) function‟s variables.</p>



<p class="wp-block-paragraph">For every closure we have three scopes:-</p>



<ul class="wp-block-list"><li>Local Scope ( Own scope)</li><li>Outer Functions Scope</li><li>Global Scope</li></ul>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/how-does-javascript-scope-work/">How does JavaScript scope work?</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/how-does-javascript-scope-work/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>List of keywords and reserved words in JavaScript</title>
		<link>https://www.scmgalaxy.com/tutorials/list-of-keywords-and-reserved-words-in-javascript/</link>
					<comments>https://www.scmgalaxy.com/tutorials/list-of-keywords-and-reserved-words-in-javascript/#respond</comments>
		
		<dc:creator><![CDATA[rajeshkumar]]></dc:creator>
		<pubDate>Thu, 22 Jul 2021 13:00:18 +0000</pubDate>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Keywords]]></category>
		<category><![CDATA[reserved words]]></category>
		<category><![CDATA[String]]></category>
		<category><![CDATA[Variables]]></category>
		<guid isPermaLink="false">https://www.scmgalaxy.com/tutorials/?p=6935</guid>

					<description><![CDATA[<p>Keyword or Reserved words var delete for let brack super void case do static function new switch while interface catch [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/list-of-keywords-and-reserved-words-in-javascript/">List of keywords and reserved words in JavaScript</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph"><strong>Keyword or Reserved words</strong></p>



<figure class="wp-block-table"><table><tbody><tr><td>var</td><td>delete</td><td>for</td><td>let</td><td>brack</td></tr><tr><td>super</td><td>void</td><td>case</td><td>do</td><td>static</td></tr><tr><td>function</td><td>new</td><td>switch</td><td>while</td><td>interface</td></tr><tr><td>catch</td><td>else</td><td>if</td><td>package</td><td>finally</td></tr><tr><td>this</td><td>with</td><td>class</td><td>enum</td><td>default</td></tr><tr><td>implements</td><td>private</td><td>throw</td><td>tiled</td><td>typeof</td></tr><tr><td>const</td><td>export</td><td>import</td><td>protected</td><td>return</td></tr><tr><td>true</td><td>continue</td><td>extends</td><td>in</td><td></td></tr><tr><td>instanceof</td><td></td><td></td><td></td><td></td></tr><tr><td>public</td><td>try</td><td>debugger</td><td>false</td><td></td></tr></tbody></table></figure>



<p class="wp-block-paragraph">In JavaScript, we do not need to specify the type of the variable because it is dynamically used by the JavaScript engine.<br>We can use var data type. It can hold any type of data like String, Number, Boolean, etc.</p>



<p class="wp-block-paragraph">Primitive Data Type                                                                Non-Primitive Data type</p>



<p class="wp-block-paragraph">String                                                                                            Object<br>Number                                                                                        Array<br>Boolean                                                                                        RegExp<br>Undefine </p>



<p class="wp-block-paragraph">                                                                                               </p>



<p class="wp-block-paragraph">                                                                                   </p>



<figure class="wp-block-image size-large"><img decoding="async" width="697" height="281" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/07/primitive-and-non-primitive.png" alt="" class="wp-image-6941" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/07/primitive-and-non-primitive.png 697w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/07/primitive-and-non-primitive-300x121.png 300w" sizes="(max-width: 697px) 100vw, 697px" /></figure>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="602" height="462" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/07/primitive-and-non-primitive-2.png" alt="" class="wp-image-6949" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/07/primitive-and-non-primitive-2.png 602w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/07/primitive-and-non-primitive-2-300x230.png 300w" sizes="auto, (max-width: 602px) 100vw, 602px" /></figure>



<p class="wp-block-paragraph"></p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/list-of-keywords-and-reserved-words-in-javascript/">List of keywords and reserved words in JavaScript</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/list-of-keywords-and-reserved-words-in-javascript/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Variables in Javascript with Rules</title>
		<link>https://www.scmgalaxy.com/tutorials/variables-in-javascript-with-rules/</link>
					<comments>https://www.scmgalaxy.com/tutorials/variables-in-javascript-with-rules/#respond</comments>
		
		<dc:creator><![CDATA[rajeshkumar]]></dc:creator>
		<pubDate>Wed, 21 Jul 2021 13:05:24 +0000</pubDate>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[const]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[rules]]></category>
		<category><![CDATA[var]]></category>
		<category><![CDATA[Variables]]></category>
		<guid isPermaLink="false">https://www.scmgalaxy.com/tutorials/?p=6881</guid>

					<description><![CDATA[<p>Variables A variable is an identifier or a name which is used to refer a value. A variable is written [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/variables-in-javascript-with-rules/">Variables in Javascript with Rules</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">Variables</h2>



<p class="wp-block-paragraph">A variable is an identifier or a name which is used to refer a value. A variable is written with a combination of letters, numbers and special characters _ (underscore) and $ (dollar) with the first letter being an alphabet.</p>



<p class="wp-block-paragraph"><strong>Ex-</strong></p>



<p class="wp-block-paragraph">c, fact, b33, total_amount etc.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="750" height="422" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/07/variables-in-javascript.jpg" alt="" class="wp-image-6882" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/07/variables-in-javascript.jpg 750w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/07/variables-in-javascript-300x169.jpg 300w" sizes="auto, (max-width: 750px) 100vw, 750px" /></figure>



<h2 class="wp-block-heading">Rules</h2>



<p class="wp-block-paragraph">• Variable can contain combination of letters, digits, underscores ( _ ), and<br>dollar signs ( $ ).<br>• Must begin with a letter A-Z or a-z or underscore or dollar sign<br>• A variable name cannot start with a number<br>• Must not contain any space characters<br>• JavaScript is case-sensitive<br>• Can‟t use reserved keywords</p>



<p class="wp-block-paragraph"></p>



<p class="wp-block-paragraph"></p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/variables-in-javascript-with-rules/">Variables in Javascript with Rules</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/variables-in-javascript-with-rules/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Javascript Tags</title>
		<link>https://www.scmgalaxy.com/tutorials/javascript-tags/</link>
					<comments>https://www.scmgalaxy.com/tutorials/javascript-tags/#respond</comments>
		
		<dc:creator><![CDATA[rajeshkumar]]></dc:creator>
		<pubDate>Mon, 19 Jul 2021 13:03:27 +0000</pubDate>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[functions]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[Variables]]></category>
		<guid isPermaLink="false">https://www.scmgalaxy.com/tutorials/?p=6595</guid>

					<description><![CDATA[<p>&#60;script> &#8211; Opening Script Tag. src &#8211; It&#8217;s an attribute of the script. name.js &#8211; This is our script file, [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/javascript-tags/">Javascript Tags</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
&amp;lt;script type=&quot;text/javascript&quot;&gt;
	document.write(&quot;Hello DevOpSchool&quot;);  
&amp;lt;/script&gt;
</pre></div>

<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
&amp;lt;script src=&quot;devops.js&quot; type=&quot;text/javascript&quot;&gt;&amp;lt;/script&gt;
</pre></div>


<p class="wp-block-paragraph"><strong>&lt;script></strong> <strong>&#8211;</strong>  Opening Script Tag.</p>



<p class="wp-block-paragraph"><strong>src</strong> <strong>&#8211;</strong> It&#8217;s an attribute of the script.</p>



<p class="wp-block-paragraph"><strong>name.js &#8211;</strong> This is our script file, which we created. The code of javascript is written inside devops.js.<br>In which DevOps is the file name, .js is the extension. Javascript has an extension of .js</p>



<p class="wp-block-paragraph"><strong>Type &#8211;</strong> This is also an attribute of the script tag, it tells the browser that it is javascript. Now it is not necessary to write it, you can leave it if you want.</p>



<p class="wp-block-paragraph"><strong>Text/javascript &#8211;</strong> It defines what type these documents are.</p>



<p class="wp-block-paragraph"><strong>document.write(&#8220;Hello World&#8221;); &#8211;</strong> This is a function which is displaying the data.</p>



<p class="wp-block-paragraph"><strong>&lt;/script> &#8211;</strong> Closing Script tag.</p>



<h2 class="wp-block-heading">How to link more than one External?</h2>



<p class="wp-block-paragraph">You can link more than one JavaScript file to a single document. Just need to write different script tags for that.</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
&amp;lt;script src=&quot;devops1.js&quot; type=&quot;text/javascript&quot;&gt;&amp;lt;/script&gt;
&amp;lt;script src=&quot;devops2.js&quot; type=&quot;text/javascript&quot;&gt;&amp;lt;/script&gt;
&amp;lt;script src=&quot;devops2.js&quot; type=&quot;text/javascript&quot;&gt;&amp;lt;/script&gt;
&amp;lt;script src=&quot;devops3.js&quot; type=&quot;text/javascript&quot;&gt;&amp;lt;/script&gt;
</pre></div>


<h2 class="wp-block-heading">How to use inline and External together in javascript?</h2>



<p class="wp-block-paragraph">No, both cannot be written together. But both inline and external can be written separately.</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
&amp;lt;!DOCTYPR&gt;
&amp;lt;HTML&gt;
    &amp;lt;head&gt;&amp;lt;title&gt;&amp;lt;/title&gt;
        
            
        &amp;lt;/script&gt;
    &amp;lt;/head&gt;
    &amp;lt;body&gt;
        &amp;lt;h1&gt;I am Heading&amp;lt;/h1&gt;
        &amp;lt;p&gt;I am Paragharph&amp;lt;/p&gt;
        
        &amp;lt;script type=&quot;text/javascript&quot;&gt;
			document.write(&quot;Hello Vijay&quot;);  
		&amp;lt;/script&gt;
        &amp;lt;br&gt;
        
        &amp;lt;script src=&quot;devops.js&quot; type=&quot;text/javascript&quot;&gt;&amp;lt;/script&gt;
        
    &amp;lt;/body&gt;
&amp;lt;/html&gt;

</pre></div>


<h2 class="wp-block-heading">Write funtion</h2>



<p class="wp-block-paragraph">This function is used to write arbitrary HTML and content into the page. If we use this function after an HTML document is fully loaded, will delete all existing HTML. It is used only for testing purposes.</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
Ex:-    document.write(&quot;Hello world&quot;);
	    document.write(variable);
	    document.write(4+2);
	    document.write(&quot;hello world . &amp;lt;br&gt;&quot;);
	    document.write(&quot;hello world . &amp;lt;br&gt;&quot; + variable +&quot;&amp;lt;br&gt;&quot;);
</pre></div>


<h2 class="wp-block-heading">Alert function in JavaScript</h2>



<p class="wp-block-paragraph">The data that will be displayed in it will be in the dialog box. You forcefully want to see this thing, then only this work will be done. In that case, you use a window. alert</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
Ex:- window.alert(&quot;Hello World&quot;);
	 window.alert(variable);
	 window.alert(4+2);
	 window.alert(&quot;hello world&quot;+ variable);
</pre></div>

<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
&amp;lt;html&gt;
	&amp;lt;head&gt;&amp;lt;title&gt;Hello JS&amp;lt;/title&gt;
		&amp;lt;script&gt;
			window.alert(&quot;Hello&quot;);
		&amp;lt;/script&gt;
	&amp;lt;/head&gt;
	&amp;lt;/body&gt;
`		&amp;lt;h1&gt;I am heading&amp;lt;/h1&gt;
		&amp;lt;p&gt;I am Paraghraph&amp;lt;/p&gt;
		
		&amp;lt;script src=&quot;name.js&quot; type=&quot;text/javascript&quot;&gt;
		&amp;lt;/script&gt;
	&amp;lt;/body&gt;
&amp;lt;/html&gt;
</pre></div>


<h2 class="wp-block-heading">Identifier</h2>



<p class="wp-block-paragraph">An identifier is a name having a few letters, numbers, and special characters _(underscore). It is used to identify a variable, function, symbolic constants, and so on.</p>



<p class="wp-block-paragraph">Ex:- X2<br>      PI<br>      Sigma<br>      Matadd</p>



<h2 class="wp-block-heading">Veriable in JavaScript</h2>



<p class="wp-block-paragraph">Variable can be any name, in which a combination of letters, numbers, and special characters can be written _()(underscore) and $(dollar). It is not necessary that there should be only a combination, it can only be a letter.</p>



<p class="wp-block-paragraph">Ex:- c, fact, b33, total_amount ect.</p>



<h2 class="wp-block-heading">Rules of Veriable in JavaScript</h2>



<ul class="wp-block-list"><li><strong>Variable can contain a combination of letters, digits, _()(underscore), and dollar signs($).</strong></li><li><strong>Must begin with a letter A-Z or a-z or underscore or dollar sign.</strong></li><li><strong>A variable name cannot start a number.</strong></li><li><strong>Must not contain any space characters.</strong></li><li><strong>JavaScript is case-sensitive</strong></li><li><strong>Can&#8217;t use reserved keywords.</strong></li></ul>



<h2 class="wp-block-heading">Reserved Keyword in javascript</h2>



<p class="wp-block-paragraph"><strong>Keyword or Reserved words</strong></p>



<figure class="wp-block-table"><table><tbody><tr><td>var</td><td>delete</td><td>for</td><td>let</td><td>brack</td></tr><tr><td>super</td><td>void</td><td>case</td><td>do</td><td>static</td></tr><tr><td>function</td><td>new</td><td>switch</td><td>while</td><td>interface</td></tr><tr><td>catch</td><td>else</td><td>if</td><td>package</td><td>finally</td></tr><tr><td>this</td><td>with</td><td>class</td><td>enum</td><td>default</td></tr><tr><td>implements</td><td>private</td><td>throw</td><td>tiled</td><td>typeof</td></tr><tr><td>const</td><td>export</td><td>import</td><td>protected</td><td>return</td></tr><tr><td>true</td><td>continue</td><td>extends</td><td>in</td><td></td></tr><tr><td>instanceof</td><td></td><td></td><td></td><td></td></tr><tr><td>public</td><td>try</td><td>debugger</td><td>false</td><td></td></tr></tbody></table></figure>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/javascript-tags/">Javascript Tags</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/javascript-tags/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Advance PHP</title>
		<link>https://www.scmgalaxy.com/tutorials/advance-php/</link>
					<comments>https://www.scmgalaxy.com/tutorials/advance-php/#respond</comments>
		
		<dc:creator><![CDATA[rajeshkumar]]></dc:creator>
		<pubDate>Fri, 09 Jul 2021 12:19:39 +0000</pubDate>
				<category><![CDATA[php]]></category>
		<category><![CDATA[functions]]></category>
		<category><![CDATA[Method]]></category>
		<category><![CDATA[objects]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[Variables]]></category>
		<guid isPermaLink="false">https://www.scmgalaxy.com/tutorials/?p=6702</guid>

					<description><![CDATA[<p>What was easy in any language was made core and what became difficult was made an advance. What happens in [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/advance-php/">Advance PHP</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">What was easy in any language was made core and what became difficult was made an advance. What happens in Core is of basic level and what happens in Advance is of upper-level.</p>



<h2 class="wp-block-heading">Object Oriented Progrmming</h2>



<p class="wp-block-paragraph">Object-Oriented Programming is a Technic that solves the problem. In this, the code breaks the object. And you see your problem on the side of the object. In which you find your problem similar to the real-world problem and it is easy to maintain, and it has to be solved.</p>



<h2 class="wp-block-heading">Class</h2>



<p class="wp-block-paragraph">The PHP class has a group of values. To manipulate whatever value you write inside the class, you also write operations in it. The class gives you this facility, that if the user does not need to know the information. So you can also hide the information. To use the application, you can keep it hidden for security purposes. Or if it will be accessed from the outside users or from an outside viewer then your application may be damaged. That&#8217;s why you can keep your application hidden, it gives class facility. You can define type using class.</p>



<h2 class="wp-block-heading">Rule</h2>



<ul class="wp-block-list"><li>The class name can be any valid label.</li><li>It can&#8217;t be PHP reserved world.</li><li>The class name must start with a letter or an underscore. Following by any number of letters, numbers, or underscore all this will work. Lwkin should not start with number.</li></ul>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
class Classname
{
	var $variable_name;  (It is also called Data Member/Properties or Attribute.)
	var $variable_name;
	
	function Method_name()
	{
		Body of method;
	}
	function Method_name(parameter_list)     (And these methods are called methods or member functions.)
	{
		Body of Method;
	}

}
</pre></div>


<p class="wp-block-paragraph"><strong>See your problem in the real world.</strong></p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
class Mobile
{
	public $model;
	function show Model (Sumber)
	{
		$this-&gt;model = $number;
		echo &quot;Model Number: $this-&gt;model&quot;;
	}
	
}
</pre></div>


<h2 class="wp-block-heading">Object</h2>



<p class="wp-block-paragraph">The object is a variable of class data type. Whenever you create an object, for that object, whatever is proper inside the class, a copy of it is prepared and it is prepared for that object. If there are 2 objects then 2 copies of that variable or that property will be created and one copy for the first object and a second copy for the second object. Whatever object you make, its copy will be ready and one copy will be distributed. But this is not the case with the member function. The member function is the same, all the objects share with it.</p>



<p class="wp-block-paragraph"><strong>The new Operator is used to create an object.</strong></p>



<p class="wp-block-paragraph">Syntax:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
class Mobile
{
	public $model;
	function show Model (Sumber)
	{
		$this-&gt;model = $number;
		echo &quot;Model Number: $this-&gt;model&quot;;
	}
	
}
$samsung = new Mobile;
$samsung-&gt;showModel(&#039;A5&#039;);

$lg = new Mobile;
$lg-&gt;showModel(&#039;M30&#039;);

</pre></div>


<p class="wp-block-paragraph">You will not need to write the class, again and again, you just have to create an object of it. And call this method with the help of that object. It will show its own model number.</p>



<p class="wp-block-paragraph"><strong>Important thing</strong></p>



<p class="wp-block-paragraph">A class is of no importance unless it has an object.</p>



<h2 class="wp-block-heading">Accessing class member using object</h2>



<p class="wp-block-paragraph">How would you make accessing a member of a class into a user object?</p>



<p class="wp-block-paragraph">-&gt; This operator is used to access the member of the class.</p>



<p class="wp-block-paragraph">object_name-&gt;variable_name;<br>$samsung-&gt;model;</p>



<p class="wp-block-paragraph">access to method<br>Object_name-&gt;method_name();<br>$samsung-&gt;showModel();</p>



<p class="wp-block-paragraph">in parameter<br>Object_name-&gt;method_name(parameter_list)<br>$samsung-&gt;showModel(&#8216;A8&#8217;);</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/advance-php/">Advance PHP</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/advance-php/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>$_GET and $_POST Variable in PHP</title>
		<link>https://www.scmgalaxy.com/tutorials/_get-and-_post-variable-in-php/</link>
					<comments>https://www.scmgalaxy.com/tutorials/_get-and-_post-variable-in-php/#respond</comments>
		
		<dc:creator><![CDATA[Joydeep M]]></dc:creator>
		<pubDate>Sat, 27 Mar 2021 12:36:41 +0000</pubDate>
				<category><![CDATA[Programming Scripting Languages]]></category>
		<category><![CDATA[Get]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[Post]]></category>
		<category><![CDATA[Variables]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/?p=5780</guid>

					<description><![CDATA[<p>$_GET and $_POST is generally used in the forms to transfer data from one file to another file. Both the [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/_get-and-_post-variable-in-php/">$_GET and $_POST Variable in PHP</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<ul class="wp-block-list"><li>$_GET and $_POST is generally used in the forms to transfer data from one file to another file. Both the variables are kind of same except when we need to keep our data secure we use $_POST and generally in the form we use $_POST.</li></ul>



<p class="wp-block-paragraph">We will see the explanation by a example:</p>



<p class="wp-block-paragraph"><strong><span style="text-decoration: underline;">Form.html</span></strong></p>



<script src="https://gist.github.com/Joydeep-cotocus/5f21d2415e74cbe7c5809be04bbb7e4c.js"></script>



<p class="wp-block-paragraph"><strong><span style="text-decoration: underline;">Testform.php</span></strong></p>



<script src="https://gist.github.com/Joydeep-cotocus/9e67b2d791cff11c8e3e74b3752ec8fa.js"></script>



<p class="wp-block-paragraph">In this form we have used &#8220;<strong>get&#8221;</strong> method and we will see the output below:</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="639" height="375" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Capture-11.jpg" alt="" class="wp-image-5750" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Capture-11.jpg 639w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Capture-11-300x176.jpg 300w" sizes="auto, (max-width: 639px) 100vw, 639px" /></figure></div>



<div class="wp-block-image"><figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="508" height="327" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Capture-12.jpg" alt="" class="wp-image-5751" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Capture-12.jpg 508w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Capture-12-300x193.jpg 300w" sizes="auto, (max-width: 508px) 100vw, 508px" /></figure></div>



<p class="wp-block-paragraph">As we can see we have used the method &#8220;<strong>get</strong>&#8221; in the form and in the output page of testform.php we can see the input given, also with that in the URL box we can see the details which we have provided in the form.html.</p>



<p class="wp-block-paragraph">If we use &#8220;<strong>post</strong>&#8221; method in the form.html we will see the difference below:</p>



<script src="https://gist.github.com/Joydeep-cotocus/9870ae337e5d82f7959e3c4c4d0330c7.js"></script>



<script src="https://gist.github.com/Joydeep-cotocus/dd56adf2588ad8404266028b3f4e0145.js"></script>



<div class="wp-block-image"><figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="438" height="257" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Capture-13.jpg" alt="" class="wp-image-5752" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Capture-13.jpg 438w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Capture-13-300x176.jpg 300w" sizes="auto, (max-width: 438px) 100vw, 438px" /></figure></div>



<p class="wp-block-paragraph">As we can see in the URL box there is no such details provided which we can see while using &#8220;<strong>post</strong>&#8221; method.</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/_get-and-_post-variable-in-php/">$_GET and $_POST Variable in PHP</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/_get-and-_post-variable-in-php/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>PHP Global and Local Variable</title>
		<link>https://www.scmgalaxy.com/tutorials/php-global-and-local-variable/</link>
					<comments>https://www.scmgalaxy.com/tutorials/php-global-and-local-variable/#respond</comments>
		
		<dc:creator><![CDATA[Joydeep M]]></dc:creator>
		<pubDate>Thu, 18 Mar 2021 06:13:54 +0000</pubDate>
				<category><![CDATA[Programming Scripting Languages]]></category>
		<category><![CDATA[Global]]></category>
		<category><![CDATA[local]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[Variables]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/?p=5611</guid>

					<description><![CDATA[<p>In this tutorial we will learn about declaring global and local variable in PHP. Initially we will see what is [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/php-global-and-local-variable/">PHP Global and Local Variable</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">In this tutorial we will learn about declaring global and local variable in PHP.</p>



<p class="wp-block-paragraph">Initially we will see what is local variable and global variable with examples.</p>



<script src="https://gist.github.com/Joydeep-cotocus/93d822ce08097ab92e1f296f66bb6367.js"></script>



<p class="wp-block-paragraph">Here if we see the variable is declared inside the function &#8220;local&#8221; so it will work inside the local function only until we return the value inside the function.</p>



<script src="https://gist.github.com/Joydeep-cotocus/52b1f9707b6a87b5946b9a54501582ee.js"></script>



<p class="wp-block-paragraph">In this we can see that the variable &#8220;a&#8221; is declared outside the function local, so it won&#8217;t work inside the function until we call it.</p>



<script src="https://gist.github.com/Joydeep-cotocus/852dcd515b4fa7442a7426362f1a8aab.js"></script>



<p class="wp-block-paragraph">If we see the output for this we will see an error since &#8220;a&#8221; is a local variable and it will not work beyond the function &#8220;test&#8221;.</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="583" height="192" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Capture-4.jpg" alt="" class="wp-image-5612" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Capture-4.jpg 583w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Capture-4-300x99.jpg 300w" sizes="auto, (max-width: 583px) 100vw, 583px" /></figure></div>



<script src="https://gist.github.com/Joydeep-cotocus/a8bb1d2e2d31211d5b38d87bbda6e0fe.js"></script>



<p class="wp-block-paragraph">Now in this code if we see, variable &#8220;a&#8221; is declared globally and we will get an error if we call it inside any function.</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="538" height="182" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Capture-5.jpg" alt="" class="wp-image-5613" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Capture-5.jpg 538w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Capture-5-300x101.jpg 300w" sizes="auto, (max-width: 538px) 100vw, 538px" /></figure></div>



<p class="wp-block-paragraph">To execute the global variable in the function we need to use predefined variable &#8220;global&#8221; inside the function.</p>



<script src="https://gist.github.com/Joydeep-cotocus/fde15810d9ffabdd4b27ca2363090cea.js"></script>



<p class="wp-block-paragraph">We will see now that it will return value inside the function as well as outside the function.</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="446" height="176" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Capture-6.jpg" alt="" class="wp-image-5614" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Capture-6.jpg 446w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2021/03/Capture-6-300x118.jpg 300w" sizes="auto, (max-width: 446px) 100vw, 446px" /></figure></div>



<p class="wp-block-paragraph">References:</p>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy"  id="_ytid_63263"  width="640" height="360"  data-origwidth="640" data-origheight="360" src="https://www.youtube.com/embed/EUqK-1Xdb38?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=0&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=1&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;" class="__youtube_prefs__  epyt-is-override  no-lazyload" title="YouTube player"  allow="fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen data-no-lazy="1" data-skipgform_ajax_framebjll=""></iframe>
</div></figure>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/php-global-and-local-variable/">PHP Global and Local Variable</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/php-global-and-local-variable/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Use of runtime variables to save into another variable using register in Ansible</title>
		<link>https://www.scmgalaxy.com/tutorials/use-of-runtime-variables-to-save-into-another-variable-using-register-in-ansible/</link>
					<comments>https://www.scmgalaxy.com/tutorials/use-of-runtime-variables-to-save-into-another-variable-using-register-in-ansible/#respond</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Thu, 06 Sep 2018 09:38:49 +0000</pubDate>
				<category><![CDATA[Ansible]]></category>
		<category><![CDATA[register]]></category>
		<category><![CDATA[Variables]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/?p=5303</guid>

					<description><![CDATA[<p>Another major use of variables is running a command and using the result of that command to save the result [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/use-of-runtime-variables-to-save-into-another-variable-using-register-in-ansible/">Use of runtime variables to save into another variable using register in Ansible</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-5308" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2018/09/ansible.png" alt="" width="600" height="350" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2018/09/ansible.png 600w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2018/09/ansible-300x175.png 300w" sizes="auto, (max-width: 600px) 100vw, 600px" /></p>
<p>Another major use of variables is running a command and using the result of that command to save the result into a variable</p>
<p>&nbsp;</p>
<div>
<div>
<pre>- hosts: all
  tasks:
  - name: Ansible register variable basic example
    shell: "find *.txt"
    args:
      chdir: "/Users/mdtutorials2/Documents/Ansible"
    register: find_output

  - debug:
      var: find_output
</pre>
<pre>#
- hosts: all
  tasks:
  - name: Ansible register with_items example
    shell: "find *.txt"
    args:
      chdir: "/Users/mdtutorials2/Documents/Ansible"
    register: with_output

  - shell: "cp {{ item }} {{item}}_bkp"
    with_items:
      - "{{ with_output.stdout_lines }}"
</pre>
</div>
</div>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/use-of-runtime-variables-to-save-into-another-variable-using-register-in-ansible/">Use of runtime variables to save into another variable using register in Ansible</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/use-of-runtime-variables-to-save-into-another-variable-using-register-in-ansible/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>InstallAnywhere Variables</title>
		<link>https://www.scmgalaxy.com/tutorials/installanywhere-variables/</link>
					<comments>https://www.scmgalaxy.com/tutorials/installanywhere-variables/#respond</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Mon, 04 Dec 2017 06:46:02 +0000</pubDate>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Variables]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/?p=1301</guid>

					<description><![CDATA[<p>installanywhereExpert created the topic: InstallAnywhere Variables During installation, InstallAnywhere keeps track of dynamic values through the use of variables. Almost [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/installanywhere-variables/">InstallAnywhere Variables</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>installanywhereExpert created the topic: InstallAnywhere Variables</strong><br />
During installation, InstallAnywhere keeps track of dynamic values through the use of<br />
variables. Almost every dynamic value in InstallAnywhere, such as the path that a<br />
Magic Folder refers to, is represented by an InstallAnywhere Variable. Variables may<br />
be modified or accessed in order to affect the functionality or behavior of an installer.</p>
<p>InstallAnywhere Variables are the key to any InstallAnywhere based installation. They<br />
allow developers to control the flow of information, and the flow of the installation.<br />
They let developers store information from the system and information input by endusers,<br />
then create rules to determine operations based on that information.<br />
Developers can even output that information to configuration files or other resources<br />
to be used by the application.</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/installanywhere-variables/">InstallAnywhere Variables</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/installanywhere-variables/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Environment variables and properties defined in jenkins &#124; Jenkins Tutorial</title>
		<link>https://www.scmgalaxy.com/tutorials/environment-variables-and-properties-defined-in-jenkins/</link>
					<comments>https://www.scmgalaxy.com/tutorials/environment-variables-and-properties-defined-in-jenkins/#respond</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Sun, 15 Jan 2017 03:02:25 +0000</pubDate>
				<category><![CDATA[Jenkins]]></category>
		<category><![CDATA[Environment]]></category>
		<category><![CDATA[Environment variables]]></category>
		<category><![CDATA[Jenkins Set Environment Variables]]></category>
		<category><![CDATA[Jenkins Tutorial]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[properties]]></category>
		<category><![CDATA[Variables]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/2017/01/15/environment-variables-and-properties-defined-in-jenkins/</guid>

					<description><![CDATA[<p>Environment variables and properties defined in jenkins Jenkins Set Environment Variables When a Jenkins job executes, it sets some environment [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/environment-variables-and-properties-defined-in-jenkins/">Environment variables and properties defined in jenkins | Jenkins Tutorial</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2><img loading="lazy" decoding="async" class="alignnone size-full wp-image-3018 aligncenter" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/environment-variables-and-p.png" alt="" width="600" height="400" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/environment-variables-and-p.png 600w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/environment-variables-and-p-300x200.png 300w" sizes="auto, (max-width: 600px) 100vw, 600px" /></h2>
<h2>Environment variables and properties defined in jenkins</h2>
<h3>Jenkins Set Environment Variables</h3>
<p>When a Jenkins job executes, it sets some environment variables that you may use in your shell script, batch command, Ant script or Maven POM <a href="https://wiki.jenkins-ci.org/display/JENKINS/Building+a+software+project#Buildingasoftwareproject-1">1</a>. The following table contains a list of all of these environment variables.</p>
<div>
<table>
<tbody>
<tr>
<th>Environment Variable</th>
<th>Description</th>
</tr>
<tr>
<td>BUILD_NUMBER</td>
<td>The current build number, such as &#8220;153&#8221;</td>
</tr>
<tr>
<td>BUILD_ID</td>
<td>The current build id, such as &#8220;2005-08-22_23-59-59&#8221; (YYYY-MM-DD_hh-mm-ss, <a href="https://issues.jenkins-ci.org/browse/JENKINS-26520" rel="nofollow">defunct</a> since version 1.597)</td>
</tr>
<tr>
<td>BUILD_URL</td>
<td>The URL where the results of this build can be found (e.g. http://buildserver/jenkins/job/MyJobName/666/)</td>
</tr>
<tr>
<td>NODE_NAME</td>
<td>The name of the node the current build is running on. Equals &#8216;master&#8217; for master node.</td>
</tr>
<tr>
<td>JOB_NAME</td>
<td>Name of the project of this build. This is the name you gave your job when you first set it up. It&#8217;s the third column of the Jenkins Dashboard main page.</td>
</tr>
<tr>
<td>BUILD_TAG</td>
<td>String of jenkins-${JOB_NAME}-${BUILD_NUMBER}. Convenient to put into a resource file, a jar file, etc for easier identification.</td>
</tr>
<tr>
<td>JENKINS_URL</td>
<td>Set to the URL of the Jenkins master that&#8217;s running the build. This value is used by <a title="Jenkins CLI" href="https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+CLI">Jenkins CLI</a> for example</td>
</tr>
<tr>
<td>EXECUTOR_NUMBER</td>
<td>The unique number that identifies the current executor (among executors of the same machine) that&#8217;s carrying out this build. This is the number you see in the &#8220;build executor status&#8221;, except that the number starts from 0, not 1.</td>
</tr>
<tr>
<td>JAVA_HOME</td>
<td>If your job is configured to use a specific JDK, this variable is set to the JAVA_HOME of the specified JDK. When this variable is set, PATH is also updated to have $JAVA_HOME/bin.</td>
</tr>
<tr>
<td>WORKSPACE</td>
<td>The absolute path of the workspace.</td>
</tr>
<tr>
<td>SVN_REVISION</td>
<td>For Subversion-based projects, this variable contains the revision number of the module. If you have more than one module specified, this won&#8217;t be set.</td>
</tr>
<tr>
<td>CVS_BRANCH</td>
<td>For CVS-based projects, this variable contains the branch of the module. If CVS is configured to check out the trunk, this environment variable will not be set.</td>
</tr>
<tr>
<td>GIT_COMMIT</td>
<td>For Git-based projects, this variable contains the Git hash of the commit checked out for the build (like ce9a3c1404e8c91be604088670e93434c4253f03) (all the GIT_* variables require git plugin)</td>
</tr>
<tr>
<td>GIT_URL</td>
<td>For Git-based projects, this variable contains the Git url (like git@github.com:user/repo.git or [https://github.com/user/repo.git])</td>
</tr>
<tr>
<td>GIT_BRANCH</td>
<td>For Git-based projects, this variable contains the Git branch that was checked out for the build (normally origin/master)</td>
</tr>
</tbody>
</table>
</div>
<h2>Promoted Build Plugin Environment Variables</h2>
<p>If you are using the <a href="https://wiki.jenkins-ci.org/display/JENKINS/Promoted+Builds+Plugin" rel="nofollow">Promoted Build Plugin</a>, you will have access to the following environment variables. This allows you to access information about your Jenkins build since certain environment variables stated above (such as BUILD_TAG now refer to the Promoted Build Plugin&#8217;s job.</p>
<div>
<table>
<tbody>
<tr>
<th>Environment Variable</th>
<th>Replaces</th>
<th>Description</th>
</tr>
<tr>
<td>PROMOTED_URL</td>
<td>BUILD_URL</td>
<td>The URL of the <strong>original</strong> Jenkins job that is involved with the promotion. BUILD_URL now refers to the Promotion&#8217;s URL</td>
</tr>
<tr>
<td>PROMOTED_JOB_NAME</td>
<td>JOB_NAME</td>
<td>The name of the <strong>original</strong> Jenkins job that is involved with the promotion. JOB_NAME now refers to the Promotion&#8217;s job&#8217;s name</td>
</tr>
<tr>
<td>PROMOTED_NUMBER</td>
<td>BUILD_NUMBER</td>
<td>The Build Number of the job being promoted. BUILD_NUMBER now refer&#8217;s the the Promotion Number</td>
</tr>
<tr>
<td>PROMOTED_ID</td>
<td>BUILD_ID</td>
<td>The Build ID (ex. &#8220;2005-08-22_23-59-59&#8221; (YYYY-MM-DD_hh-mm-ss) ) of the <strong>original</strong> Jenkins job. BUILD_ID now refer&#8217;s to the Promotion&#8217;s build ID.</td>
</tr>
</tbody>
</table>
</div>
<h1>System Properties</h1>
<table>
<tbody>
<tr>
<th><a href="http://54.154.154.23:8080/systemInfo">Name  ↓</a></th>
<th><a href="http://54.154.154.23:8080/systemInfo">Value   </a></th>
</tr>
<tr>
<td>awt.toolkit</td>
<td>sun.awt.X11.XToolkit</td>
</tr>
<tr>
<td>com.sun.akuma.Daemon</td>
<td>daemonized</td>
</tr>
<tr>
<td>executable-war</td>
<td>/usr/lib/jenkins/jenkins.war</td>
</tr>
<tr>
<td>file.encoding</td>
<td>UTF-8</td>
</tr>
<tr>
<td>file.encoding.pkg</td>
<td>sun.io</td>
</tr>
<tr>
<td>file.separator</td>
<td>/</td>
</tr>
<tr>
<td>java.awt.graphicsenv</td>
<td>sun.awt.X11GraphicsEnvironment</td>
</tr>
<tr>
<td>java.awt.headless</td>
<td>true</td>
</tr>
<tr>
<td>java.awt.printerjob</td>
<td>sun.print.PSPrinterJob</td>
</tr>
<tr>
<td>java.class.path</td>
<td>/usr/lib/jenkins/jenkins.war</td>
</tr>
<tr>
<td>java.class.version</td>
<td>52.0</td>
</tr>
<tr>
<td>java.endorsed.dirs</td>
<td>/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.111-2.b15.el7_3.x86_64/jre/lib/endorsed</td>
</tr>
<tr>
<td>java.ext.dirs</td>
<td>/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.111-2.b15.el7_3.x86_64/jre/lib/ext:/usr/java/packages/lib/ext</td>
</tr>
<tr>
<td>java.home</td>
<td>/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.111-2.b15.el7_3.x86_64/jre</td>
</tr>
<tr>
<td>java.io.tmpdir</td>
<td>/tmp</td>
</tr>
<tr>
<td>java.library.path</td>
<td>/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib</td>
</tr>
<tr>
<td>java.runtime.name</td>
<td>OpenJDK Runtime Environment</td>
</tr>
<tr>
<td>java.runtime.version</td>
<td>1.8.0_111-b15</td>
</tr>
<tr>
<td>java.specification.name</td>
<td>Java Platform API Specification</td>
</tr>
<tr>
<td>java.specification.vendor</td>
<td>Oracle Corporation</td>
</tr>
<tr>
<td>java.specification.version</td>
<td>1.8</td>
</tr>
<tr>
<td>java.vendor</td>
<td>Oracle Corporation</td>
</tr>
<tr>
<td>java.vendor.url</td>
<td>http://java.oracle.com/</td>
</tr>
<tr>
<td>java.vendor.url.bug</td>
<td>http://bugreport.sun.com/bugreport/</td>
</tr>
<tr>
<td>java.version</td>
<td>1.8.0_111</td>
</tr>
<tr>
<td>java.vm.info</td>
<td>mixed mode</td>
</tr>
<tr>
<td>java.vm.name</td>
<td>OpenJDK 64-Bit Server VM</td>
</tr>
<tr>
<td>java.vm.specification.name</td>
<td>Java Virtual Machine Specification</td>
</tr>
<tr>
<td>java.vm.specification.vendor</td>
<td>Oracle Corporation</td>
</tr>
<tr>
<td>java.vm.specification.version</td>
<td>1.8</td>
</tr>
<tr>
<td>java.vm.vendor</td>
<td>Oracle Corporation</td>
</tr>
<tr>
<td>java.vm.version</td>
<td>25.111-b15</td>
</tr>
<tr>
<td>JENKINS_HOME</td>
<td>/var/lib/jenkins</td>
</tr>
<tr>
<td>jna.loaded</td>
<td>true</td>
</tr>
<tr>
<td>jna.platform.library.path</td>
<td>/usr/lib64:/lib64:/usr/lib:/lib:/usr/lib64/mysql</td>
</tr>
<tr>
<td>jnidispatch.path</td>
<td>/tmp/jna&#8211;1712433994/jna4147775405825940943.tmp</td>
</tr>
<tr>
<td>line.separator</td>
<td></td>
</tr>
<tr>
<td>mail.smtp.sendpartial</td>
<td>true</td>
</tr>
<tr>
<td>mail.smtps.sendpartial</td>
<td>true</td>
</tr>
<tr>
<td>os.arch</td>
<td>amd64</td>
</tr>
<tr>
<td>os.name</td>
<td>Linux</td>
</tr>
<tr>
<td>os.version</td>
<td>3.10.0-514.el7.x86_64</td>
</tr>
<tr>
<td>path.separator</td>
<td>:</td>
</tr>
<tr>
<td>sun.arch.data.model</td>
<td>64</td>
</tr>
<tr>
<td>sun.boot.class.path</td>
<td>/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.111-2.b15.el7_3.x86_64/jre/lib/resources.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.111-2.b15.el7_3.x86_64/jre/lib/rt.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.111-2.b15.el7_3.x86_64/jre/lib/sunrsasign.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.111-2.b15.el7_3.x86_64/jre/lib/jsse.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.111-2.b15.el7_3.x86_64/jre/lib/jce.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.111-2.b15.el7_3.x86_64/jre/lib/charsets.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.111-2.b15.el7_3.x86_64/jre/lib/jfr.jar:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.111-2.b15.el7_3.x86_64/jre/classes</td>
</tr>
<tr>
<td>sun.boot.library.path</td>
<td>/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.111-2.b15.el7_3.x86_64/jre/lib/amd64</td>
</tr>
<tr>
<td>sun.cpu.endian</td>
<td>little</td>
</tr>
<tr>
<td>sun.cpu.isalist</td>
<td></td>
</tr>
<tr>
<td>sun.font.fontmanager</td>
<td>sun.awt.X11FontManager</td>
</tr>
<tr>
<td>sun.io.unicode.encoding</td>
<td>UnicodeLittle</td>
</tr>
<tr>
<td>sun.java.command</td>
<td>/usr/lib/jenkins/jenkins.war &#8211;logfile=/var/log/jenkins/jenkins.log &#8211;webroot=/var/cache/jenkins/war &#8211;daemon &#8211;httpPort=8080 &#8211;debug=5 &#8211;handlerCountMax=100 &#8211;handlerCountMaxIdle=20</td>
</tr>
<tr>
<td>sun.java.launcher</td>
<td>SUN_STANDARD</td>
</tr>
<tr>
<td>sun.jnu.encoding</td>
<td>UTF-8</td>
</tr>
<tr>
<td>sun.management.compiler</td>
<td>HotSpot 64-Bit Tiered Compilers</td>
</tr>
<tr>
<td>sun.os.patch.level</td>
<td>unknown</td>
</tr>
<tr>
<td>svnkit.http.methods</td>
<td>Digest,Basic,NTLM,Negotiate</td>
</tr>
<tr>
<td>svnkit.ssh2.persistent</td>
<td>false</td>
</tr>
<tr>
<td>user.country</td>
<td>US</td>
</tr>
<tr>
<td>user.dir</td>
<td>/</td>
</tr>
<tr>
<td>user.home</td>
<td>/var/lib/jenkins</td>
</tr>
<tr>
<td>user.language</td>
<td>en</td>
</tr>
<tr>
<td>user.name</td>
<td>jenkins</td>
</tr>
<tr>
<td>user.timezone</td>
<td>America/New_York</td>
</tr>
</tbody>
</table>
<h1>Environment Variables</h1>
<table>
<tbody>
<tr>
<th><a href="http://54.154.154.23:8080/systemInfo">Name  ↓</a></th>
<th><a href="http://54.154.154.23:8080/systemInfo">Value   </a></th>
</tr>
<tr>
<td>_</td>
<td>/etc/alternatives/java</td>
</tr>
<tr>
<td>HOME</td>
<td>/var/lib/jenkins</td>
</tr>
<tr>
<td>LANG</td>
<td>en_US.UTF-8</td>
</tr>
<tr>
<td>LOGNAME</td>
<td>jenkins</td>
</tr>
<tr>
<td>NLSPATH</td>
<td>/usr/dt/lib/nls/msg/%L/%N.cat</td>
</tr>
<tr>
<td>PATH</td>
<td>/sbin:/usr/sbin:/bin:/usr/bin</td>
</tr>
<tr>
<td>PWD</td>
<td>/</td>
</tr>
<tr>
<td>SHELL</td>
<td>/bin/bash</td>
</tr>
<tr>
<td>SHLVL</td>
<td>2</td>
</tr>
<tr>
<td>USER</td>
<td>jenkins</td>
</tr>
<tr>
<td>XFILESEARCHPATH</td>
<td>/usr/dt/app-defaults/%L/Dt</td>
</tr>
</tbody>
</table>
<h1>Plugins</h1>
<table>
<tbody>
<tr>
<th><a href="http://54.154.154.23:8080/systemInfo">Name  ↓</a></th>
<th><a href="http://54.154.154.23:8080/systemInfo">Version   </a></th>
<th><a href="http://54.154.154.23:8080/systemInfo">Enabled   </a></th>
<th><a href="http://54.154.154.23:8080/systemInfo">Pinned   </a></th>
</tr>
<tr>
<td>ace-editor</td>
<td>1.1</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>ant</td>
<td>1.4</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>antisamy-markup-formatter</td>
<td>1.5</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>bouncycastle-api</td>
<td>2.16.0</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>branch-api</td>
<td>1.11.1</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>build-timeout</td>
<td>1.18</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>cloudbees-folder</td>
<td>5.16</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>credentials</td>
<td>2.1.10</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>credentials-binding</td>
<td>1.10</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>display-url-api</td>
<td>0.5</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>durable-task</td>
<td>1.12</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>email-ext</td>
<td>2.53</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>external-monitor-job</td>
<td>1.7</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>git</td>
<td>3.0.1</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>git-client</td>
<td>2.2.0</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>git-server</td>
<td>1.7</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>github</td>
<td>1.25.1</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>github-api</td>
<td>1.84</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>github-branch-source</td>
<td>1.10.1</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>github-organization-folder</td>
<td>1.5</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>gradle</td>
<td>1.25</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>handlebars</td>
<td>1.1.1</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>icon-shim</td>
<td>2.0.3</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>jacoco</td>
<td>2.1.0</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>javadoc</td>
<td>1.4</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>jira</td>
<td>2.3</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>jobConfigHistory</td>
<td>2.15</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>jquery</td>
<td>1.11.2-0</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>jquery-detached</td>
<td>1.2.1</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>junit</td>
<td>1.19</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>ldap</td>
<td>1.13</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>mailer</td>
<td>1.18</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>mapdb-api</td>
<td>1.0.9.0</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>matrix-auth</td>
<td>1.4</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>matrix-project</td>
<td>1.8</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>maven-plugin</td>
<td>2.14</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>momentjs</td>
<td>1.1.1</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>pam-auth</td>
<td>1.3</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>pipeline-build-step</td>
<td>2.4</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>pipeline-graph-analysis</td>
<td>1.3</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>pipeline-input-step</td>
<td>2.5</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>pipeline-milestone-step</td>
<td>1.3</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>pipeline-rest-api</td>
<td>2.4</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>pipeline-stage-step</td>
<td>2.2</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>pipeline-stage-view</td>
<td>2.4</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>plain-credentials</td>
<td>1.3</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>resource-disposer</td>
<td>0.3</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>scm-api</td>
<td>1.3</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>script-security</td>
<td>1.25</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>sonar</td>
<td>2.5</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>ssh-credentials</td>
<td>1.12</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>ssh-slaves</td>
<td>1.12</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>structs</td>
<td>1.5</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>subversion</td>
<td>2.7.1</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>thinBackup</td>
<td>1.9</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>timestamper</td>
<td>1.8.7</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>token-macro</td>
<td>2.0</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>windows-slaves</td>
<td>1.2</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>workflow-aggregator</td>
<td>2.4</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>workflow-api</td>
<td>2.8</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>workflow-basic-steps</td>
<td>2.3</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>workflow-cps</td>
<td>2.23</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>workflow-cps-global-lib</td>
<td>2.5</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>workflow-durable-task-step</td>
<td>2.7</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>workflow-job</td>
<td>2.9</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>workflow-multibranch</td>
<td>2.9.2</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>workflow-scm-step</td>
<td>2.3</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>workflow-step-api</td>
<td>2.7</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>workflow-support</td>
<td>2.12</td>
<td>true</td>
<td>false</td>
</tr>
<tr>
<td>ws-cleanup</td>
<td>0.32</td>
<td>true</td>
<td>false</td>
</tr>
</tbody>
</table>
<p><strong>Useful Plugins</strong></p>
<p><a href="https://wiki.jenkins-ci.org/display/JENKINS/EnvInject+Plugin" target="_blank" rel="noopener">https://wiki.jenkins-ci.org/display/JENKINS/EnvInject+Plugin</a></p>
<p><strong>Reference</strong></p>
<p><a href="https://wiki.jenkins-ci.org/display/JENKINS/Building+a+software+project" target="_blank" rel="noopener">https://wiki.jenkins-ci.org/display/JENKINS/Building+a+software+project</a><br />
<a href="http://jenkins:8080/systemInfo" target="_blank" rel="noopener">http://jenkins:8080/systemInfo</a></p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/environment-variables-and-properties-defined-in-jenkins/">Environment variables and properties defined in jenkins | Jenkins Tutorial</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/environment-variables-and-properties-defined-in-jenkins/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
