Profile Photo
  • Profile picture of Rohama Salfi

    Rohama Salfi

    11 months, 3 weeks ago

    Function In Javascript⬇️
    Humare pas different blocks of code hote hain jo task perform karte hain. Function ko hum events par call karke us par task perform kar sakte hain ya hum agar apna function banaye aur us mein data enter karein toh ye bhi ho sakhta hai. For example: If I have to make coffee, toh mein function mein step wise coffee banane ke steps ko write karo gii step 1,2 and so on…. karke aur fir apne document mein mere ko jahan bhi coffee banane ke steps ki zaroorat paregi mein wahan function ke naam ko call karungi par iss se pehle hum function ko name denge. Function ke andar parameters bhi hote hain jo function ke data ko customize karne ke liye use hote hain mean to say if I have to add steps to boil milk with the steps to make coffee toh hum aisa kar sakte hain. Ab return statement kya hoti hai, return statement asal mein humare paas function ka output hota hai jo har bar function ke call hone par show hoga, jahan return statement use hogi wahan par function ki execution automatically stop ho jayegi or return statement ke baad koi bhi code function ke andar agar likha ho toh wo execute, I mean run nahi karega.
    Syntax:
    function function-name(parameter1, parameter2) {
    Your Code…..
    }
    #xalfi

About Me

Rohama Salfi

Student

Hello! I'm Rohama Salfi, a student studying in Sg-Educate Institute, With a passion for developing websites. I was born and raised in Faisalabad. I completed my middle from Allied School, matric from Govt Pilot School and intermediate from Eduacators College. Beyond my professional life, I am passionate about photography, editing, playing basket ball. Beyond this all am risk-taker, adventurer, philosopher, narcissistic person. Feel free to connect with me on email rohxama@gmail.com. I'm always open to discussions and sharing insights with like-minded individuals. Thank you for taking the time to learn a bit about me.

Media

Groups

Group logo of Web Development
Web Development
Private Group

Join our community and discover the secrets of online income