Skip to main content

JAVASCRIPT FUNCTIONS



Functions are the block of code that performs specific task and often return a value. Any function can be understood as a reusable code-block that will be executed by an event, or when the function is called. A javaScript function may return zero or more parameters. Parameters can be understood as the standard technique of passing control to a function. JavaScript functions can be of two types:
1. Built-In Function: JavaScript provides a set of in built function that can be used to perform specific functions Some of them are eval(),parseInt(),parseFloat().
a. eval(): eval() function is used to convert a string expression a numeric value
E.g. Evaluating a expression using eval()
var a=eval(“5*5+6”);
eval() function evaluates the expression and assigns 26 to variable a .
Note: In case you pass a string value as a parameter eval() expression will not be generated. You need to convert the data type. This can be done using parseInt() discussed below:
b. parseInt(): parseInt() function is used to convert a string value to an integer. It returns the first integer contained in the string. The function will return a 0 value in case string does not begin with an integer.
E.g. var a=parseInt(“89hello”);
In above example parseInt will return the first two integer value i.e a=89
E.g:
var h=(“89hello”);
var a=parseInt(h);
In above example parseInt will return the first two integer value of string stored in variable h.
c. parseFloat(): Just like a parseInt() function parseFloat() is used to convert a string value to float value.
E.g. Applying all the three built in functions





Output:

Comments

Popular posts from this blog

Advantages and Disadvantages of EIS Advantages of EIS Easy for upper-level executives to use, extensive computer experience is not required in operations Provides timely delivery of company summary information Information that is provided is better understood Filters data for management Improves to tracking information Offers efficiency to decision makers Disadvantages of EIS System dependent Limited functionality, by design Information overload for some managers Benefits hard to quantify High implementation costs System may become slow, large, and hard to manage Need good internal processes for data management May lead to less reliable and less secure data

Inter-Organizational Value Chain

The value chain of   a company is part of over all value chain. The over all competitive advantage of an organization is not just dependent on the quality and efficiency of the company and quality of products but also upon the that of its suppliers and wholesalers and retailers it may use. The analysis of overall supply chain is called the value system. Different parts of the value chain 1.  Supplier     2.  Firm       3.   Channel 4 .   Buyer

CONCEPTUAL VIEW OF MIS

The concept is a blend of principles, theories and practices of management, information and system giving rise to a single product called MANAGEMENT INFORMATION SYSTEM . The concept of management gives high regard to the individual and his ability to use the information. MIS gives information through data analysis. While analyzing the information, it relies on many academic disciplines like management science, OR, organization behavior, psychology, etc. The foundation of MIS is the principles of management and its practices. MIS uses the concept of management control in its design and relies heavily on the fact that the decision maker is a human being and is a human processor of information. A MIS can be evolved for a specific objective it is evolved after systematic planning and design. It calls for an analysis of business, management views and policies, organization culture and the management style. The MIS,therefore relies heavily on systems theory.The systems theory offers soluti