Posts

Showing posts from February, 2025

FUNCTION PARAMETER/ types of parameter

 FUNCTION PARAMETER:- -parameter is special types of data used inside function().  Ex.     function display(A)  -A is called parameter.  Ex.     function show(name,city) -name,city called parameter.   TYPES OF PARAMETER:- there are two types of parameters used in function:- 1)receivers parameter  2)senders parameter 1) RECEIVERS PARAMETER:- - IN this parameters only create at the time of functions creations. Ex.   function display(Name,city) -(it is called receivers parameter.)   {   } 2) SENDER PARAMETER:-(argument) -in this parameter only used at the time of function calling inside the onclick event. Ex.   <button onclick="display(10)"> log in </button> -((10) called sender parameter)  <html> <head> <script language="JavaScript">   function display(roll,name)    {   document.write(roll);   document.write("<br>");   document.write(name);...

JavaScript Function:-

 JavaScript Function:- - Function is a small job program  - function separator  - Function terminology  1)function Defination:- create a function is called function defination 2) function calling:- when user can use the function is called function calling - how to create a function in javascript:- Inside javascript all function is to be created using function keyword function name() {  statement  } all statement inside the function is called container statement  function display() { }   How to access function:- -Access function inside the javascript using button control -Inside the button control we have to use on click event  <html> <head> <script langauge="JavaScript">      function display()   {     document.write("Welcome");    } </script> </head> <body>  <button onclick="display()">Submit</button>   </body> </html>  How to a...

JAVA SCRIPT STRING HANDLING CONCEPT:-

 JAVA SCRIPT STRING HANDLING CONCEPT:- -in this concept we have to use some string handling function for managing string data. 1) length function.     var msg="welcome";   document.write(msg.length); 2) uppercase function.  var msg="welcome to nagpur";  document.write(msg.toUpperCase()); 3) lowercase function.  var msg="WELCOME NAGPUR";  document.write(msg.toLowerCase());  4) concat function.(dono word ko marge karna ):- note:- blank space dene ke liye (" ",) var s1="nagpur";   var s2="city";   var s3=s1.concat(" ",s2);   document.write(s3); 5) replace function.   var s1="nagpur is a good city, nagpur is big city";   var s2=s1.replace("nagpur","pune")   document.write(s2);       6) replaceall function.   var s1="nagpur is a good city, nagpur is big city";   var s2=s1.replaceAll("nagpur","pune")   document.write(s2);      7) padstart function. -(for ex. bank ...

DO WHILE LOOP / FOR LOOP / HOW TO USE N NUMBER OF LOOPS

 DO WHILE LOOP:- in this loop is also called exist loop because in this loop first execute the statement than check the condition. <html> <head> <script language="JavaScript">   var i=1;   do   {   document.write(i);   i=i+1;     }   while(i<=10);    </script> </head> </html> FOR LOOP:- -while and do while loop is required multiple line. -we have to use and other type of loops is called for loop, it is also called single line loop. -for loop is dividing into 3 sections.  1)variable loop  2)condition loop  3)increment or decrement <html> <head> <script language="JavaScript">   var i;   for(i=1; i<=10; i=i+1)    {   document.write(i);    }    </script> </head> </html> HOW TO USE N NUMBER OF LOOPS:- (N= user input) <html> <head> <script language="JavaScript">    ...

WHILE LOOPS

 1) DEFINED LOOPS:-    1) WHILE LOOP:-         -While loop is called define loop     -while loop is continuously execute the program as long as the condition is true.     -looping is used to counter variable.     -while loop also called as entry loop. <html> <head> <script language="JavaScript"> var i=1; while(i <=10) { document.write(i + "<br>");  i=i+1;   } </script> </head> </html> que= write a program to display 1 to 10 even number  2,4,6,8,10,12,14,16,18,20 <html> <head> <script language="JavaScript">   var i=2;   while(i <=10) {   document.write(i);   i=i+2; } </script> </head> </html> que-2  write a program to display 1 to 10 odd number. <html> <head> <script language="JavaScript">   var i=1;   while(i <=10)   {   document.write(i);   i=i+2; ...

LOOPING FUNDAMENTAL

 LOOPING FUNDAMENTAL:- 1) looping is process for using repeatation of a statement. 2) in programming concept using twe types of loops.     1. define loop - specified the condition. ex. display 1 to 10 numbers      display 1 to 10 even numbers   -in defined loop using while, dowhile and for loop.     2. undefined loop -       - in this types of loop is not specified the condition, this types of loops is contiously execute in a program. EX.  for(;;) 

How to accept numerical data value/ program management

 How to accept numerical data value:-         -In javascript accept numerical data using parseInt() method  var a,b,c;   a=parseInt(prompt("Enter any number"));    b=parseInt(prompt("Enter any number"));   c= a + b;   document.write("The value of c is " + c);  Program management:- - All types of programming langauge is used to two types of method for managing the program  1) condition management 2)flow management 1) condition management:- if-else,else-if,switch case 2) flow management:- -It is called looping statement  while loop, do while loop,for loop  - if-else use only single condition  var a,b,c;   a=parseInt(prompt("Enter any number"));    b=parseInt(prompt("Enter any number"));   c= a + b;   document.write("The value of c is " + c);  Else if statement:- -else-if is used to check multiple conditions in a program  Q-input percent from the user and check the fallowing c...

CHOICE BASED PROGRAMMING:-

 CHOICE BASED PROGRAMMING:- 1)in this concept user can create option based program. 2)choice based programming is used to switch case fundamental. syntax:- switch() { case 1: statement  break; case 2: statement break; case 3: statement break; default: statement (if choice can not match than returning default statement) break; }  <html> <head> <script language="JavaScript"> var ch;    ch=parseInt(prompt("enter your choice")); switch (ch)     { case 1: document.write("one");    break;   case 2: document.write("two"); break; case 3: document.write("three"); break; case 4: documenr.write("four"); break; default: document.write("invalid choice");    break; } </script> </head> </html>

HOW TO CREATE VARIABLE IN JAVASCRIPT

 HOW TO CREATE VARIABLE IN JAVASCRIPT:- in java script variable is to be created using 'var' keyword  syntax:- note:- variable can not used "" inverted couma. VAR NAME; ex.:-     var city;     var college;     var country; var a=10; document.write(a); var city="Nagpur"; document.write(city); HOW TO DISPLAY VARIABLE DATA WITH MASSAGE:- result is  the value of a-10 note :- in java script using variable with massage (+) operator) var a=10; document.write("the value of a" + a); HOW TO INPUT DATA FROM THE USER USING PROMPT STATMENT:- var a;  a=prompt("enter any number");  document.write(1); HOW TO DISPLAY VARIABLE VALUE INSIDE THE TAG:- var a;   a=prompt("enter any number");   document.write("<h1>" + a +"</h1>");

JAVA SCRIPT VARIABLE

  JAVA SCRIPT VARIABLE:- IMP variable is name of location where user can store all type of data element. ex. a=10 b=10.5 c=Ramesh ( a,b,c called variables) TYPES OF VARIABLES:- there are two types of variables. 1. variant variables 2. non variant variables  1) VARIANT VARIABLES:-   10-intezer      (any type of number)   10.5-float      ( Decemal word)   Nagpur-string   (any type of mssg)  In programming Language variable is representing there type is called variant Variable. ex. int a;      float b; 2) N0N VARIANT:-     non variant variable is depend on data value.  ex. a=10     b=10.5     c=nagpur

JAVA SCRIPT / JAVASCRIPT STATEMENT

  JAVA SCRIPT :- 1.Java script is provide programming fundamental in HTML language. 2.java script is case sensitive language. (different between upper case letter or lower case letter  3.all scripting is used inside the <Head> structure:- <html> <head> <script language="JavaScript"> [create your logics] </script> </head> </html>    JAVASCRIPT STATEMENT:-   note:-java script can not used any type of HTML tag programming mei statement ke last me ; jaruri hai  there are following statement used in JAVA SCRIPT:- 1.output statement  2. Alert statement 3. Input statement 4. confirm statement html> <head> <script language="JavaScript">  document.write("welcome to Nagpur");  document.write("<br>");  document.write("Pune");  alert("this is alert box");  confirm("this is confirm box");  prompt("this is input box"); </script> </head> </html...