Wednesday, December 4, 2019

Find Your Friend's Birthday | Fun Project | JavaScript

Find Your Friend's Birthday | Fun Project


This is a fun project build with HTML and JavaScript.
Here, you store your friend’s birthdays, and search the friend’s name and get the birthday.
I make this today, I am feeling bored in the afternoon, so I made this, I know this is a very basic thing, but I want to share it with you. If you guys support me, I will make more advance project with JavaScript

If you guys want to design it, you are most welcome. Sent me the design in comments.

Watch the Tutorial Video





Source Code

Index.html

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Find Birthday</title>
</head>
<body>
    <center>
        <h1>Find Your Friend's Birthday</h1>
        <input type="text" id="name" placeholder="Enter Your Friend's Name.."><br><br>
        <button onclick="findBirthday()">Find</button>
        <span id="match"></span>
    </center>
    
</body>
<script src="main.js"></script>
</html>


main.js


function findBirthday() {
    const birthdays = [
        {
            name"mainak",
            birthday"29th Nov"
        },
        {
            name"sohini",
            birthday"6th Dec"
        },
        {
            name"suparna",
            birthday"13th dec"
        },
        {
            name"indrajit",
            birthday"3rd sept"
        },
        {
            name"kunal",
            birthday"5th Nov"
        },
        {
            name"suvajit",
            birthday"20th jan"
        },
        {
            name"trayee",
            birthday"4th jully"
        },
        {
            name"avantika",
            birthday"27th jully"
        },
        {
            name"ritam",
            birthday"23th may"
        },
        {
            name"anirban",
            birthday"25th jan"
        },
        {
            name"subhajit paul",
            birthday"23th oct"
        },
        {
            name"debajyoti bhunia",
            birthday"23th sept"
        }

    ]

    const n = document.getElementById("name").value
    console.log(n);
    
    const name = n.toLowerCase()

    for (let i = 0; i < birthdays.length; i++) {
        if (birthdays[i].name === name) {
            console.log(birthdays[i].birthday);
            // alert(birthdays[i].birthday)
            document.getElementById("match").innerHTML = `
                <p>The birthday of ${n} is ${birthdays[i].birthday}</p>
            `
            break
        } else {
            // console.log("No match");
            document.getElementById("match").innerHTML = `
                <p>No Match</p>
            `
        }
    }
}






15 comments:

  1. your article on data science is very good keep it up thank you for sharing.
    Data Science Training in Hyderabad

    ReplyDelete
    Replies
    1. The development of artificial intelligence (AI) has propelled more programming architects, information scientists, and different experts to investigate the plausibility of a vocation in machine learning. Notwithstanding, a few newcomers will in general spotlight a lot on hypothesis and insufficient on commonsense application. machine learning projects for final year In case you will succeed, you have to begin building machine learning projects in the near future.

      Projects assist you with improving your applied ML skills rapidly while allowing you to investigate an intriguing point. Furthermore, you can include projects into your portfolio, making it simpler to get a vocation, discover cool profession openings, and Final Year Project Centers in Chennai even arrange a more significant compensation.


      Data analytics is the study of dissecting crude data so as to make decisions about that data. Data analytics advances and procedures are generally utilized in business ventures to empower associations to settle on progressively Python Training in Chennai educated business choices. In the present worldwide commercial center, it isn't sufficient to assemble data and do the math; you should realize how to apply that data to genuine situations such that will affect conduct. In the program you will initially gain proficiency with the specialized skills, including R and Python dialects most usually utilized in data analytics programming and usage; Python Training in Chennai at that point center around the commonsense application, in view of genuine business issues in a scope of industry segments, for example, wellbeing, promoting and account.


      The Nodejs Projects Angular Training covers a wide range of topics including Components, Angular Directives, Angular Services, Pipes, security fundamentals, Routing, and Angular programmability. The new Angular TRaining will lay the foundation you need to specialise in Single Page Application developer. Angular Training

      Delete
  2. thank you for the valuable information giving on data science it is very helpful.
    Data Science Training in Hyderabad

    ReplyDelete
  3. Best Advanced excel institute in Delhi/Noida is High Technologies Soloutions which provides best training in advanced excel. All the trainers have 5+ years experience in their fields. HTS focus more on practical knowledge than theory which makes training sessions more interesting and trainers focus on individual training as well.HTS provides 100% placement help. Join now!! Call at +919311002620 or visit our website.
    advanced excel course in Delhi
    advanced excel course in Noida

    ReplyDelete
  4. Grow your career with Python in machine learning. High technologies solutions is the best Python training institute in Delhi and Noida with 100% placement help. 5+ years experienced trainers.Join now!! Call at +919311002620.
    Python with machine learning training in delhi
    Python with machine learning training in Noida

    ReplyDelete
  5. High technologies solutions provides the best tally training in Delhi with 100% placement.Trainers are subject specialist and corporate professionals providing in-depth study. 100% placement guaranteed.For free demo class call at +919311002620.
    Tally training institute delhi
    Tally training institute in Noida

    ReplyDelete
  6. High technologies solutions offers the best Autocad training in Delhi and Noida with 100% placement help. Trainers at HTS are friendly, cooperative and subject specialist having more than 5 years of experience.For free demo class Call +919311002620 or visit our website.
    autocad training institute in Delhi
    autocad training institute in Noida

    ReplyDelete
  7. High technologies solutions offers the best Autocad training in Delhi and Noida with 100% placement help. Trainers at HTS are friendly, cooperative and subject specialist having more than 5 years of experience.For free demo class Call +919311002620 or visit our website.
    autocad training institute in Delhi
    autocad training institute in Noida

    ReplyDelete

  8. Get trained in Autocad from the best training institute in Delhi and Noida. High technologies solutions provides the best training with 100% placement help. Trainers at HTS are friendly, cooperative and subject specialist having more than 5 years of experience.For free demo class Call +919311002620 or visit our website.
    autocad training institute in Delhi
    autocad training institute in Noida

    ReplyDelete
  9. High Technologies solutions is the leading institute in Delhi and Noida providing the best AutoCAD course with the very basic of CAD design all the way to advanced CAD.Experienced trainers and 100% placement help. Call +9311002620.
    autocad training institute in Delhi
    autocad training institute in Noida

    ReplyDelete
  10. Join the best Autocad leading institute in Delhi and Noida. High technologies Solutions provides the best AutoCAD course with the very basic of CAD design to advanced CAD.Experienced trainers and 100% placement help. Call +9311002620.
    autocad training institute in Delhi
    autocad training institute in Noida

    ReplyDelete