javaScript is a high-level, interpreted programming language that conforms to the ECMAScript specification. JavaScript has curly-bracket syntax, dynamic typing, prototype-based object-orientation, and first-class functions.
This repository is the collection of php Programs that has been done While Learning javaScript as well as the collection of the program that were done while solving heavy Challenges.
NOTE:- All the Notes are Included inside the Programs.
This repo has divided into two main categories that covers:-
Learning Section:- This section have all the php programs that will help you to understand all the Basic as well as Advance Concepts of bulding the structure of our website.
Practice Section:- This Section Contains programs that are challanging.
Declare variables called country, continent and population and assign their values according to your own country (population in millions). Log their values to the console.
CHALLENGE #1 Mark and John are trying to compare their BMI (Body Mass Index), which is calculated using the formula: BMI = mass / (height * height) (mass in kg and height in meters).
CHALLENGE #2 Use the BMI example from Challenge #1, and the code you already wrote, and improve it: 1. Print a nice output to the console, telling the user who has the higher BMI. The message can be either: "Mark's BMI is higher than John's!" or "John's BMI is higher than Mark's!".
CHALLENGE #3 Calculate the average score for each team, using the test data included below. The average score for Dolphins should be assigned to the scoreDolphins variable, and the average score of Koalas should be assigned to the scoreKoalas variable.
CHALLENGE #4 Calculate the tip, depending on the bill value. Create a variable called tip for this. It's not allowed to use an if...else statement (if it's easier for you, you can start with an if...else statement, and then try to convert it to a ternary operator).
CHALLENGE #1 A team only wins if it has at least double the average score of the other team. Otherwise, no team wins! Your tasks: Create an arrow function calcAverage to calculate the average of 3 scores. This function should have three parameters and return a single number (the average score).
CHALLENGE #2 Write a function calcTip that takes any bill value as an input and returns the corresponding tip, calculated based on the rules above (you can check out the code from the first tip calculator challenge if you need to). Use the function type you like the most. Test the function using a bill value of 100.
CHALLENGE #3 For each of them, create an object with properties for their full name, mass, and height (Mark Miller and John Smith). Name these objects as mark and john, and their properties exactly as fullName, mass and height.
CHALLENGE #4 Create an array called bills containing all 10 test bill values. Create empty arrays for the tips and the totals (tips and totals) Use the calcTip function we wrote before (included in the starter code) to calculate tips and total values (bill + tip) for every bill value in the bills array. Use a for loop to perform the 10 calculations!