Q.1 :- concatenate multiple string variables in JavaScript

String1: Hello String1: World

Q.2 :- Print the innerHTML of p tag to the alert box

Welcome Users!


Q.3 :- Change the input value i.e :- Jhon==>Tom


Q.4 :- Give an example of get attribute and setattribute

Lorem ipsum dolor sit amet consectetur adipisicing elit. At, fugiat.


Q.5 :- Take input from the user and add 2 numbers


Q.6 :- Take a range from 1 - 20 and print the even number

1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20

Q.7 :- Create array inside object and read the values .

const data = { name: "Ankit", age: 24, workingDay: ["Mon", "Tue", "Wed", "Thu", "Fri"] };

Q.8 :- var a = { data : [ { name:"abc", email:"abc@gmail.com" }, { name:"pqr", email:"pqr@gmail.com" } ] }; read the values

Q.9 :- print the following data "registration": '2017-01-03', "capacity": 7, "registration": '2018-03-03', "capacity": 5 let cars = [ { "color": "purple", "type": "minivan", "registration": '2017-01-03', "capacity": 7 }, { "color": "red", "type": "station wagon", "registration": '2018-03-03', "capacity": 5 } ]

Q.10 :- create object inside object and read it with for loop

const students = { stu1: { name: "keval", email: "keval@gmail.com", id: 1, }, stu2: { name: "vishal", email: "vishal@gmail.com", id: 2, }, stu3: { name: "arun", email: "arun@gmail.com", id: 3, } };

Q.11 :- Write a JavaScript program to check whether a given positive number is a multiple of 3 or a multiple of 7.


Q.12 :- Write a JavaScript program to check two given numbers and return true if one of the numbers is 50 or if their sum is 50.


Q.13 :- Write a JavaScript program to compute the sum of the two given integers. If the two values are same, then returns triple their sum.


Q.14 :- Find the longest string from a given array ["Hello","Javascript"]

Q.14 :- Find the longest string from a given array ["Hello","Javascript"]

Q.15 :- print following from given array c,g,f,n Given Array :- ["a", "b", ["c", ["d", "e", ["f", "g"], "k"], "l"], "m", "n"]

Q.16 :- Check whether a string starts with 'Java' print true and false otherwise .Given String = "Javascript"




Q.17 :-Write a JavaScript function to calculate the sum of values in an array.

q17Arr = [2,4,6,8,11,13,15,17,19]

Q.18 :-Write a JavaScript function to calculate the product of values in an array.

q18Arr = [1,3,5,7,9,12,14,16,18,20]

Q.19 :- Write a JavaScript function that accepts a number as a parameter and check if the number is prime or not.



Q.20 :-Write a JavaScript validation for empty input field


Q.21 :-Write a JavaScript validation for email field


Q.22 :-Write a JavaScript validation for password field


Q.23 :-Give an example of replace method with "gi"

Fuzzy Wuzzy was a bear. Fuzzy Wuzzy had no hair. Fuzzy Wuzzy wasn’t fuzzy, was he?




Mr Blue has a blue house and a blue car.


Q.24 :- Swap two images

sample-1 sample-2

Q.25 :- Get the value of the selected radio button with JavaScript

Q.26 :- Give an example of break.

Example 1: break with for Loop

Program to print the value of i

          
            for (let i = 1; i <= 5; i++) {
              if (i==3) { 
                break; 
              } 
            }
          
        



Example 2: break with while Loop

Program to find the sum of positive numbers. If the user enters a negative numbers, break ends the loop. The negative number entered is not added to sum

        
          let sum = 0, number;
          
          while(true) {
          
          // take input again if the number is positive
          number = parseInt(prompt('Enter a number: '));
          
          // break condition
          if(number < 0) { break; } // add all positive numbers sum +=number; }
        
      

Example 3: break in switch statements

The following code has a break statement that terminates the switch statement when a case is matched and the corresponding code has run.

      
        const food = ;
        
        switch (food) {
        case "sushi":
        console.log("Sushi is originally from Japan.");
        break;
        case "pizza":
        console.log("Pizza is originally from Italy.");
        break;
        default:
        console.log("I have never heard of that dish.");
        break;
        }
      
    

Q.27 :-Take input from the user and print the number of vowels present in the string.


Q.28 :-Take input from the user and Print Number of words and character present in the string


Q.28A :- Change the color of div from dropdown value

Q.29 :- Create Dynamic Modal.

your_name
weathering_with_you
a_silent_voice

Q.30 :- To do List.

To-Do List App

Q.31 :- Create BMI Calculator.

KG/M2

Q.32 :- Create Math Calculator.

Q.33 :- Create Currency converter.

Q.34 :- Create Accordian.

Simple

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Auto hide

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Q.35 :- add border to the borderless table

Name Email Contact
abc abc@gmail.com 1234
def def@gmail.com 5678
ghi ghi@gmail.com 9101

Q.36 :- Convert month name to a number of days


Number of days in entered month:

Q.37 :-Take 3 sides of the triangle as input from the user and check whether that triangle is equilateral, scalene or isosceles.

Q.38 :-Find the largest of three given number from input.


Largest Number:

Q.39 :-Find the smallest of three given number from input.


Smallest Number:

Q.40 :-On-scroll Change the color and height of navbar

Lorem ipsum dolor dummy text to enable scrolling, sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Lorem ipsum dolor dummy text to enable scrolling, sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Lorem ipsum dolor dummy text to enable scrolling, sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.