How to make relationship with JavaScript
By: Samayun Miah Chowdhury
Tags: Javascript Number, String, JavaScript, Javascript Math, Arrays

Hello programmers, how’s going today? Are you fine?

Are you depressed in single life? Don’t worry. I am introducing a new cute girl with you. I am overwhelmed (ক্রাশ খাইছি ) seeing her . )

Her name.startsWith('J') && name.endsWith('t') her name is "Javascript” . So Let’s try to date with her 😀

* Her Info [History of my crush]

In September 1995, a Netscape programmer named Brandan Eich developed a new scripting language in just 10 days 🤯. It was originally named Mocha , but quickly became known as LiveScript and, later, JavaScript your crush 😎

How is her Characteristics ?

JavaScript often abbreviated as JS, is a programming language that conforms to the ECMAScript specification . JavaScript is high-level, often just-in-time (JIT) compiled, and multi-paradigm. It has curly-bracket syntax, dynamic typing , prototype-based object-orientation , and first-class functions .

As a multi-paradigm language, JavaScript supports event-driven , functional, and imperative programming styles . It has application programming interfaces (APIs) for working with text, dates, regular expressions, standard data structures , and the Document Object Model (DOM) .

What will she make for You?

Sorry to say 😭 She won’t make Pizza for you . But She will make your life easier & smarter 🤓

She can make Single Page Applications `

` She can build Progressive Web Apps . (PWA is cutest sister of her )

. (PWA is cutest sister of her ) She can communicate with Server in background by Ajax

She can make Hybrid even Native Apps for You 😝 (Her Sisters: ` React Native , Ionic etc )

etc ) She can make Desktop Applications (By her elder brother : Electron JS)

She builds web application for you , works on server side too .

You can use MongoDB as NoSQL Database which uses JavaScript like syntax 🎃

as Database which uses JavaScript like syntax 🎃 She works so hard . She is used in Machine Learning too 🎃 Trust me & search Tensorflow.js

too 🎃 Trust me & search Even she is used in Internet Of Things (IoT) . & Robotics Platform (Don’t trust me . Check : http://johnny-five.io )

Now is it her weakness ,she can’t make Pizza for you?

Javascript has big community which is larger than The Pacific Ocean 😱

She has The World’s Largest Software Registry (Library) called NPM .

Day by day how much packages is being created you can’t imagine . It seems they will go ahead than population growth in Bangladesh .

* How to preparation proposing her 🤦‍♀️

She is not senior girls you like . She is a interpreted at the same time Just In Time compiled programming language.

You need browser for client side JavaScript . Or Node installed Computer/Mobile/Freeze/TV whatever you have 🧜‍♀️

( Setup Node Environment tutorial here)

& run this code in client & server side too.

console.log("Hello JavaScript , I love you. Will you marry me?")

If she runs correctly simply means she also loves you .Carry on man. It’s beginning of your relationship. Dive into deep. Congratulations 😊

* Give her cute name [String]

Name, Text is called String in JavaScript . People says text but you have to say String . Even you have to write string using Single Quotation '' or Double Quotation "” or backticks sign `` to impress her 😋

How much character needs to write your crush’s name ? run this console.log("Javascript".length); // 10

You decided your name’s first letter must be included in her name . otherwise you will do 0 million dollar break up with her .

Run this code:

let crushName = “JavaScript”;

let myName = “Samayun”;

let myFirstLetter = myName.charAt(0); //return 1st char of string

let haveMyFirstLetterMatched = crushName.includes(myFirstLetter) ; if (haveMyFirstLetterMatched) {

console.log("I will stay with her 😘 ");

} else {

console.log("Break Up. Break Up. 0 Million Dollar Breakup 😬 ");

}

How to rename your cute crush’s name?

let crushName = "Jerin Khan";

let myGivenName = crushName.replace("Jerin Khan", "Babu 😚");

console.log(myGivenName); // now ask her Babu Khaicho?

Call her shortly using substring method. Suppose her name is “Babui Pakhi” call her “babu”

let crushName = "Babui Pakhi";

let myGivenName = crushName.substring(0, 4);

console.log(myGivenName); // now ask her Babu Khaicho?

* Calculates marriage cost [Math]

After spending 2 years realationship you decided to marry her. But you are a junior developer . You need so money for marriage cost . Don’t worry javascript will help you calculate marriage cost . You don’t need any cashiar to compute these.

You wanna buy a Red Benaroshee Sharee for her . How is your budget? Shop manager asked 30450.500 . But you have 30450 TK . So use Math.floor(Number) method

let shareePrice = 30450.500

console.log(Math.floor(shareePrice));

You have million dollars , don’t have money problem . So you will buy unlimited sharee 😁 Calculate all sharee 🥻 price . Suppose you wanna bought 30 sharee for your wife , her sister , her sister , her nephew , her cousin etc.

You don’t need any assistant cashiar bro . JS will do for you.Run this program

let totalShareeCount = 30

let everyShareePrice = 25000.800

let totalCost = Math.round(totalShareeCount * everyShareePrice)

console.log(totalCost); // 750024

Make sure your wife’s sharee 🥻 is the most expensive . Your you will get million dollar divorce . So be careful. Dont’t worry JS will help you to make sure.

let jamiaShareePrice = 15000;

let lamiaShareePrice = 25000;

let dariaShareePrice = 25000;

let myWifeShareePrice = 35000; let mostExpensive = Math.max(jamiaShareePrice,lamiaShareePrice, dariaShareePrice, myWifeShareePrice); if(mostExpensive === myWifeShareePrice){

console.log("You will be a good husband 🤩");

} else {

console.log("🥵 You are getting divorced very soon 🥶");

}

* Baby Plan [Number , Array]

Did you plan about your baby names before?

Now just make an array of baby names you & your wife likes & run this program .You get your selected baby name 😀

let childNames = [ "Halima Sultana", "Turna Hatun", "Bala Hatun","Samia Parvin","Tasmiya Jahan", "Taha Tabassum", "Isabella"]; let randomIndex = Math.floor(Math.random() * childNames.length); console.log(childNames[randomIndex])

We are not sure your baby will be boy or girl . I gave example of girl baby name. So is javascript capable to select a nice name for your any child however he/she is boy or girl doesn’t matter?

When the baby will came , just run this program . If don’t get proper result re-run program until you get your baby name 😃

let girlChildNames = [ "Halima Sultana", "Turna Hatun", "Bala Hatun","Samia Parvin","Tasmiya Jahan", "Taha Tabassum", "Isabella"]; let boyChildNames = [ "Salman", "Amir", "Shahrukh","Salahuddin Yusuf Ayubi","Nasir Jamshed", "Sakib Al Hasan", "Tarek Zamil"]; let allBabyNames = girlChildNames.concat(boyChildNames); let randomIndex = Math.floor(Math.random() * allBabyNames.length); console.log(allBabyNames[randomIndex])

* The Endgame

You were single 🙆‍♀️ JavaScript made you mingle 👩‍❤️‍👨.

Now you have wife , childs 👩‍👩‍👧‍👦. Just Thanks to JavaScript & me.

Thank You ♥️