Monday, July 4, 2022

How to print JavaScript table in reverse order program Programmatically

 If you want to print table in JavaScript here what you can do . In this example we going to print table of 8 programmatically . below is explanation and at end of explanation you will get code 

Step no 1 

lets declare variable j =8 ;

since we want to print  table of 8 

Step no 2

user while loop or for loop

since it is in reverse order our starting point is 10 , we will run loop until i reach to 1 and i-- mean i =i-1 so we will not going to increment instead we will decrement by one . so in our case loop start with 10 and check if i is greater than one , it will loop until i reach to 1.

Document .write is used for print or observe in browser if you want to use console you can simple replace console.log

now we use variable j which we store value (in this case 8) and we we use i it means it will print position of i and at last we are using j*i it means value of j is 8 and times position of i until value of i reaches to i . 

if you want to print table of 10 in reverse order simple change value of j to 10. Below is code and out put.  

                                                                     Code:

<script>
       
     j = 8
    for(let i=10;i>=1;i--){
     
        document.write(`${j} times ${i} is ${j*i}<br>`)  
        console.log(`${j} times ${i} is ${j*i}`)      
    }

</script>

 -                                                                      out put:



Saturday, March 26, 2022

App Privacy Policy

**Privacy Policy**


Guruji Guru built the General Knowledge Quiz app as a Free app. This SERVICE is provided by Guruji Guru at no cost and is intended for use as is.


This page is used to inform visitors regarding my policies with the collection, use, and disclosure of Personal Information if anyone decided to use my Service.


If you choose to use my Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that I collect is used for providing and improving the Service. I will not use or share your information with anyone except as described in this Privacy Policy.


The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which are accessible at General Knowledge Quiz unless otherwise defined in this Privacy Policy.


**Information Collection and Use**


For a better experience, while using our Service, I may require you to provide us with certain personally identifiable information, including but not limited to name, email address, contact address, query , feedback . The information that I request will be retained on your device and is not collected by me in any way.


The app does use third-party services that may collect information used to identify you.


Link to the privacy policy of third-party service providers used by the app


*   [Google Play Services](https://www.google.com/policies/privacy/)

*   [AdMob](https://support.google.com/admob/answer/6128543?hl=en)

*   [Google Analytics for Firebase](https://firebase.google.com/policies/analytics)

*   [Facebook](https://www.facebook.com/about/privacy/update/printable)

*   [Appodeal](https://www.appodeal.com/home/privacy-policy/)

*   [Unity](https://unity3d.com/legal/privacy-policy)

*   [AppLovin](https://www.applovin.com/privacy/)

*   [StartApp](https://www.startapp.com/privacy/)

*   [AdColony](https://www.adcolony.com/privacy-policy/)


**Log Data**


I want to inform you that whenever you use my Service, in a case of an error in the app I collect data and information (through third-party products) on your phone called Log Data. This Log Data may include information such as your device Internet Protocol (“IP”) address, device name, operating system version, the configuration of the app when utilizing my Service, the time and date of your use of the Service, and other statistics.


**Cookies**


Cookies are files with a small amount of data that are commonly used as anonymous unique identifiers. These are sent to your browser from the websites that you visit and are stored on your device's internal memory.


This Service does not use these “cookies” explicitly. However, the app may use third-party code and libraries that use “cookies” to collect information and improve their services. You have the option to either accept or refuse these cookies and know when a cookie is being sent to your device. If you choose to refuse our cookies, you may not be able to use some portions of this Service.


**Service Providers**


I may employ third-party companies and individuals due to the following reasons:


*   To facilitate our Service;

*   To provide the Service on our behalf;

*   To perform Service-related services; or

*   To assist us in analyzing how our Service is used.


I want to inform users of this Service that these third parties have access to their Personal Information. The reason is to perform the tasks assigned to them on our behalf. However, they are obligated not to disclose or use the information for any other purpose.


**Security**


I value your trust in providing us your Personal Information, thus we are striving to use commercially acceptable means of protecting it. But remember that no method of transmission over the internet, or method of electronic storage is 100% secure and reliable, and I cannot guarantee its absolute security.


**Links to Other Sites**


This Service may contain links to other sites. If you click on a third-party link, you will be directed to that site. Note that these external sites are not operated by me. Therefore, I strongly advise you to review the Privacy Policy of these websites. I have no control over and assume no responsibility for the content, privacy policies, or practices of any third-party sites or services.


**Children’s Privacy**


These Services do not address anyone under the age of 13. I do not knowingly collect personally identifiable information from children under 13 years of age. In the case I discover that a child under 13 has provided me with personal information, I immediately delete this from our servers. If you are a parent or guardian and you are aware that your child has provided us with personal information, please contact me so that I will be able to do the necessary actions.


**Changes to This Privacy Policy**


I may update our Privacy Policy from time to time. Thus, you are advised to review this page periodically for any changes. I will notify you of any changes by posting the new Privacy Policy on this page.


This policy is effective as of 2022-03-26


**Contact Us**


If you have any questions or suggestions about my Privacy Policy, do not hesitate to contact me at gurunew0@gmail.com.


This privacy policy page was created at [privacypolicytemplate.net](https://privacypolicytemplate.net) and modified/generated by [App Privacy Policy Generator](https://app-privacy-policy-generator.nisrulz.com/) 

Tuesday, January 25, 2022

How to print numbers in ascending order by using for loop and while loop| JavaScript

 If you are learning JavaScript, these simple program like how to How to print numbers in ascending order by using for loop and while loop? is very helpful . You can understand how actually loops works by these program.

Lets Start how to make print 1 to100 by using two way for loop and while and loop

Let's start with For loop

Step 1 Create Function

function dec() {

}

Step 2 inside function use for loop 

Step 3 call function dec()

 for(let k=1k<=50k++){
            
                console.log(`Even number is ${k}`)
            }

Video Source 

In English



In Hindi
 


Now lets understand logic. 

First we write for and then inside () we write our logic.

first we declare our variable as K and since we want to print number from 1 it is our starting point.

Now we want to specify our condition since when loop will work , in this case our k is not reach to 50.  and k++  means every time will add one. In other word k = K+1 but k++ is short form. 

So in this case k start with 1 and check with the condition that K is less than or equal to 50? in this case yes so next step will console our statement and then it will add 1. So now K becomes 2 , and loop going on until it reach to 51 and it breaks. 


        function dec(){
            for(let k=1k<=50k++){
            
                console.log(`Even number is ${k}`)
            }
        }
dec()



Now we understand with While loop 

 Syntax of while loop is little different

Step 1 first we declare variable 

let i = 1

Step 2 now  specify condition 

while (1<=50) 

then {

{

and inside console.log (i) and main important thing do not forget i++other wise loop will not end .

      function dec(){
            let k = 1;
            while(k<=20)
           {
             
            console.log(k)
             
              
               k++;
           }
           
        }

dec() 


Sunday, January 9, 2022

How to make JavaScript projects or app?

This blog is for you if you want to make JavaScript project or app. 
I will also add video in English as well as in Hindi . I will also add source code . 
Basically we are making 3 apps.



1. Mile to KM Convertor JavaScript App or Project 
 App is Conversion App where you can convert miles to Km.by taking this project as reference you can make currency convertor ,Feet to Inches Convertor, KG to LB and many more. Just change formula. 
Also in this app there is custom error message where if user does not enter any Value , user will get custom error message. And as soon as user enter value , error message will go away ,and app will convert mile to km. 
In this  app you will learn few concept of HTML, CSS ,  and variable ,IF else statement , DOM (Document Object Model concept) from JavaScript step by step. 
Source Code

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>App</title>
    <style>
        #container{
            height: 400px;
            width: 400px;
            border: 3px solid rgb(51, 4, 4);
        }
        h1{
            text-align: center;
        }
        input{
            background-color: blue;
            color: white;
            width: 90px;
            height: 50px;
            font-size: x-large;
        }
        button{
            height: 40px;
            width: 100px;
            margin-top: 10px;
            margin-left: 100px;
            background-color: rgb(56, 6, 6);
            color: white;
            font-size: large;
        }
  #error{
      color: red;
  }

    </style>
</head>
<body>
    <div id ="container">
        <h1>Mile to KM</h1>
       <h4><span id= "error"></span></h4>
        Mile<input id="mile" type ="text">
        KM:<input id= "km" type ="text"><br>
        <button id ="submit" > Submit</button>
    </div>
   

 <script>
newmile= document.getElementById("mile")
newkm= document.getElementById("km")
newerror= document.getElementById("error")
newsub= document.getElementById("submit")
newsub.addEventListener("click",function(){
    if(newmile.value===""){
        newerror.innerText="Please enter value"
    }
    else{
        newerror.innerText=""
        newkm.value=newmile.value*1.609344
    }
 
})
 </script>

   
</body>
</html>


2. JavaScript Quiz App / Project
In app you will learn how to make JavaScript simple quiz by using JavaScript library jQuery. In  video CDN method has used . Where if user click on Hide button, All Answer will be hide and as soon user click on show method Answer will be shown to user.  Also there is another way in jQuery if you use toggle in build method then on one button user can hide and show answer . Hide, show and toggle jQuery method is used. 
  Source Code
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Quiz</title>
    <style>
        #box{
            height: 400px;
            width: 500px;
            background-color: dodgerblue;
            margin-left: 20px;
            text-align: center;
            border: 2px solid black;
            color: white;
        }
        p{
            color: red;
            font-size: x-large;
            font-weight: bold;
        }
        #hide{
            height: 30px;
            width: 50px;
            color: white;
            background-color: red;

        }
        #show{
            height: 30px;
            width: 50px;
            color: white;
            background-color: green;

        }
        #to{
           
            height: 30px;
            width: 50px;
            color: white;
            background-color: rgb(6, 14, 6);

       
        }

    </style>
</head>
<body>
    <div id= "box">
        <h1>QuizApp</h1>
        <h3>1. What is 2 + 2?</h3>
        <p>4</p>
        <h3>2. What is 2 - 2?</h3>
        <p>0</p>
        <h3>3. Where is Mumbai </h3>
        <p>India</p>
        <button id ="hide">Hide</button>
        <button id ="show">Show</button>
        <button id ="to">Toggle</button>
    </div>
    <script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
    <script>
        $(document).ready(function(){
         $("#hide").click(function(){
             $("p").hide();
         })
         $("#show").click(function(){
             $("p").show();
         })
         $("#to").click(function(){
             $("p").toggle()
         })
       
        })
    </script>
</body>
</html>

3. Lotto App
In this JavaScript app, computer will generate 3 random number if user click on button . Math.floor and Math.random method used in this all to generate random number. In this tutorial you will get hint of how to use and call JavaScript function and how to use console to making sure if logic is correct. 
 Source Code
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Lotto</title>
    <style>
        #container{
            height: 500px;
            width: 500px;
            border: solid 2px black;
            text-align: center;
        }
        input{
            background-color: blue;
            color: white;
            height: 100px;
            width: 100px;
            text-align: center;
            font-size: xx-large;
            font-weight: bold;
            margin-top: 10px;
        }
        button{
            height: 80px;
            width: 80px;
            margin-top: 10px;
            font-size: larger;
            background-color: green;
            color: white;

        }
    </style>
</head>
<body>
    <div id ="container">
        <h1>LottoApp</h1>
        <input id ="one"type="text">
        <input id ="two" type="text">
        <input id = "three"type="text"><br>

        <button id = "submit">Click</button>
    </div>

    <script>
        num1= document.getElementById("one")
        num2= document.getElementById("two")
        num3 =document.getElementById("three")
        sub =document.getElementById("submit")
        sub.addEventListener("click", function(){
            one()
            two()
            three()
        })
        function one(){
            num1.value=Math.floor(Math.random()*10)
        }
        function two(){
            num2.value=Math.floor(Math.random()*10)
        }
        function three(){
            num3.value=Math.floor(Math.random()*10)
        }
       

    </script>
</body>
</html>

Video Source :
                                                      In English Language



                                                           In Hindi Language 






Saturday, December 18, 2021

how to refill Swiffer wet jet bottle?

 When you bought Swiffer wet jet , and when it time to refill it is very difficult to open a bottle to refill liquid and when you want to buy it new it is very expensive and we are contributing plastic to environment .In this case is there any solution to refill Swiffer wet jet bottle? 

Answer is yes.  

Here is the process

First take cup of water and make it warm for two minutes in microwave , now put bottle cap to water and after two minute or so try to open . If cap is still tight repeat process and keep it bottle for longer time. 

After  Swiffer wet jet bottle cap is opened, add your favorite liquid and close bottle. Observe if there is any leak, now cap is closed and you are good until you are out of liquid . 

Repeat process on same bottle.  


Saturday, October 30, 2021

How to create easy Quiz Application for beginner?

If you are learning any computer language , It is important to make some project or interesting App and combined you knowledge or components which you have learnt. Quiz Application is one of them .Not only it allow to test your knowledge but also  it is very interesting. If you know JavaScript or beginners of JavaScript and learning library like jQuery. It is fun to make simple project or quiz application by hide and toggle function. 

Below is video of step by step video tutorial for how to make quiz application in JavaScript. HTML, CSS,  Bootstrap and JavaScript are main topics for this tutorial.


  

Thursday, October 21, 2021

Learn how to make Javascript app for Beginners

 If you are learning Javascript by watching video or by some tutorial , and not sure how to implement these knowledge and build few program. Most of the time if we are learning we get concept individually but we are not sure how to use it . So it is best idea to integrate all concept and come up with program.

If  you know HTML, CSS , and know concept of if else statement, Loop, DOM, Event, Function we can make some lotto app, Conversion App, if know basic JQuery we can built Quiz App.

I made one video where I tried to use HTML, CSS , Javascript concept of  if else statement, Loop, DOM, Event, Function, Custom validation and made 3 apps or program from scratch. This are fun projects or programs for beginners. If you are studying JavaScript and want to showcase your work you may use it and come with some similar idea , modify and showcase your work.

Video Tutorial



java switch statement | Java Tutorial For Beginners

 Switch statement is alternative and more cleaner way to write code if we have more than two options. we can use else if, this is better way...