<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: hex-paradus</title>
    <description>The latest articles on Forem by hex-paradus (@hexparadus).</description>
    <link>https://forem.com/hexparadus</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F679361%2F68185b14-f45e-4f1f-9e56-e22269a46395.png</url>
      <title>Forem: hex-paradus</title>
      <link>https://forem.com/hexparadus</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/hexparadus"/>
    <language>en</language>
    <item>
      <title>Section 02: JavaScript Fundamentals</title>
      <dc:creator>hex-paradus</dc:creator>
      <pubDate>Mon, 09 Aug 2021 22:32:33 +0000</pubDate>
      <link>https://forem.com/hexparadus/java-fundamentals-2-33he</link>
      <guid>https://forem.com/hexparadus/java-fundamentals-2-33he</guid>
      <description>&lt;p&gt;'Use Strict'&lt;br&gt;
/*&lt;/p&gt;

&lt;p&gt;//Assingment1&lt;br&gt;
//Function basics&lt;br&gt;
function describeCountry(country, population, capitalCity) {&lt;br&gt;
  return &lt;code&gt;${country} has ${population} million people and its capital city is ${capitalCity}&lt;/code&gt;&lt;br&gt;
}&lt;br&gt;
console.log(describeCountry('Bangladesh', 200, 'Dhaka'));&lt;br&gt;
console.log(describeCountry('Pakistan', 240, 'Islamabad'));&lt;br&gt;
console.log(describeCountry('India', 1000, 'Delhi'));;&lt;/p&gt;

&lt;p&gt;//Assingment2&lt;br&gt;
//Function expression&lt;br&gt;
const percentageOfWorld1 = function (population) {&lt;br&gt;
  return (population / 7900) * 100&lt;br&gt;
}&lt;br&gt;
const bangladesh1 = percentageOfWorld1(200);&lt;br&gt;
const india1 = percentageOfWorld1(1200)&lt;br&gt;
const USA1 = percentageOfWorld1(360)&lt;br&gt;
console.log(bangladesh1, india1, USA1);&lt;br&gt;
//Function declaration&lt;br&gt;
//can call function before creating it&lt;br&gt;
const bangladesh2 = percentageOfWorld2(200);&lt;br&gt;
const india2 = percentageOfWorld2(1200)&lt;br&gt;
const USA2 = percentageOfWorld2(360)&lt;br&gt;
function percentageOfWorld2(population) {&lt;br&gt;
  return (population / 7900) * 100&lt;br&gt;
}&lt;br&gt;
console.log(bangladesh2, india2, USA2)&lt;br&gt;
//Assingment3&lt;br&gt;
//Arrow Functions&lt;br&gt;
const percentageOfWorld3 = population =&amp;gt; (population / 7900) * 100//Use for one line operations as this one&lt;br&gt;
const bangladesh3 = percentageOfWorld3(200);&lt;br&gt;
const india3 = percentageOfWorld3(1200)&lt;br&gt;
const USA3 = percentageOfWorld3(360)&lt;br&gt;
console.log(bangladesh3, india3, USA3)&lt;br&gt;
//Assingment4&lt;br&gt;
//FunctionsCallingFunctions&lt;br&gt;
const describePopulation = function (country, population) {&lt;br&gt;
  return &lt;code&gt;${country} has ${population} million people, which is about ${percentageOfWorld1(200)} of the world&lt;/code&gt;&lt;br&gt;
}&lt;br&gt;
console.log(describePopulation("bangladesh", 200))&lt;br&gt;
//Assingment5&lt;br&gt;
//IntroductionToArrays&lt;br&gt;
//Lists in python =&amp;gt;&amp;gt;&amp;gt; Array in JavaScript&lt;br&gt;
const populations = new Array(200, 1200, 370, 1440)//Method 1 of creating an array in JS&lt;br&gt;
console.log(populations.length === 4);&lt;br&gt;
const percentages = [bangladesh1, india1, USA1, percentageOfWorld1(populations[populations.length - 1])]//Method 2(OG method) of creating arrays&lt;br&gt;
console.log(percentages)&lt;/p&gt;

&lt;p&gt;//Assingment5&lt;br&gt;
//BasicArrayOperations&lt;br&gt;
const neighbours = new Array("India", "Myanmar", "Sri-Lanka");&lt;br&gt;
neighbours.push("Utopia");//Add to end&lt;br&gt;
console.log(neighbours)&lt;br&gt;
neighbours.pop();//Remove from end&lt;br&gt;
console.log(neighbours)&lt;br&gt;
if (!neighbours.includes("Germany")) {&lt;br&gt;
  console.log("Probably not a central European country :D.")&lt;br&gt;
}&lt;br&gt;
neighbours[neighbours.indexOf("India")] = 'Republic of India';//array[index]=replaceValue&lt;br&gt;
console.log(neighbours)&lt;/p&gt;

&lt;p&gt;//Assingment6&lt;br&gt;
//IntroductionToArrays&lt;br&gt;
//Dictionaries in Python =&amp;gt;&amp;gt;&amp;gt; Objects  in JavaScript&lt;/p&gt;

&lt;p&gt;const myCountry = {&lt;br&gt;
  country: 'Bangladesh',&lt;br&gt;
  captital: 'Dhaka',&lt;br&gt;
  language: 'Bengali',&lt;br&gt;
  population: 200,&lt;br&gt;
  neighbours: neighbours&lt;br&gt;
}&lt;br&gt;
console.log(myCountry)&lt;br&gt;
//Assingment6&lt;br&gt;
//Dot&amp;amp;BracketNotation&lt;br&gt;
console.log(&lt;code&gt;${myCountry.country} has ${myCountry.population} million ${myCountry.language} speaking people, ${myCountry.neighbours.length} neighbouring countries and a capital called ${myCountry.captital}.&lt;/code&gt;)&lt;br&gt;
myCountry.population = myCountry.population + 2;//or use myCountry.population +=2&lt;br&gt;
console.log(myCountry.population)&lt;br&gt;
// console.log(myCountry['population' - 2]) This doesn't work because inside myCountry[x],x should be a key or expression of a key. It find the value from the key in the object.It doesn't modfy it.&lt;br&gt;
myCountry["population"] -= 2;&lt;br&gt;
console.log(myCountry.population);&lt;/p&gt;

&lt;p&gt;//Assingment7&lt;br&gt;
//ObjectMethods&lt;br&gt;
const neighbours = new Array("India", "Myanmar", "Sri-Lanka");&lt;br&gt;
const myCountry = {&lt;br&gt;
  country: 'Bangladesh',&lt;br&gt;
  captital: 'Dhaka',&lt;br&gt;
  language: 'Bengali',&lt;br&gt;
  population: 200,&lt;br&gt;
  neighbours: neighbours,&lt;br&gt;
  describe: function () {&lt;br&gt;
    return console.log(&lt;code&gt;${this.country} has ${this.population} million ${this.language} speaking people, ${this.neighbours.length} neighbouring countries and a capital called ${this.captital}.&lt;/code&gt;)&lt;/p&gt;

&lt;p&gt;},&lt;br&gt;
  checkIsIsland: function () {&lt;br&gt;
    // this.isIsland = this.neighbours.length === 0 ? true : false&lt;br&gt;
    this.isIsland = !Boolean(this.neighbours.length)&lt;br&gt;
  }&lt;br&gt;
}&lt;br&gt;
console.log(myCountry);&lt;br&gt;
myCountry.describe();&lt;br&gt;
myCountry.checkIsIsland();&lt;br&gt;
console.log(myCountry);&lt;/p&gt;

&lt;p&gt;//Assingnment8&lt;br&gt;
//ForLoop&lt;br&gt;
for (let voterNo = 1; voterNo &amp;lt;= 50; voterNo++) {&lt;br&gt;
  console.log(&lt;code&gt;Voter number ${voterNo} is currently voting.&lt;/code&gt;)&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;//Assingment9&lt;br&gt;
//LoopingArrays+Break&amp;amp;Continue&lt;br&gt;
const populations = new Array(200, 1200, 370, 1440)&lt;br&gt;
const percentages = []&lt;/p&gt;

&lt;p&gt;const percentageOfWorld1 = function (population) {&lt;br&gt;
  return (population / 7900) * 100&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;for (let i = 0; i &amp;lt; populations.length; i++) {&lt;br&gt;
  // percentages.push(populations[i] / 79)&lt;br&gt;
  percentages.push(percentageOfWorld1(populations[i]))//I had issues figuring this out.To make it simple, create the function outside the loop.Then call the function inisde it.&lt;br&gt;
}&lt;br&gt;
console.log(percentages)&lt;/p&gt;

&lt;p&gt;//Assingment10&lt;br&gt;
//loopsInLoops&lt;br&gt;
//Failed to do this one :(&lt;br&gt;
const listOfneighbours = [[&lt;code&gt;Canada&lt;/code&gt;, &lt;code&gt;Mexico&lt;/code&gt;], ['Spain'], ['Norway', 'Sweden', 'Russia']];&lt;br&gt;
for (let i = 0; i &amp;lt; listOfneighbours.length; i++) {&lt;br&gt;
  for (let j = 0; j &amp;lt; listOfneighbours[i].length; j++)&lt;br&gt;
    console.log(&lt;code&gt;Neighbour: ${listOfneighbours[i][j]}&lt;/code&gt;)&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;&lt;em&gt;/&lt;br&gt;
"Use Strict";&lt;br&gt;
/&lt;/em&gt;&lt;br&gt;
//CodingChallenge1&lt;br&gt;
//Functions&lt;br&gt;
const dolphinsScore1 = 85;&lt;br&gt;
const dolphinsScore2 = 54;&lt;br&gt;
const dolphinsScore3 = 41;&lt;br&gt;
const koalasScore1 = 23;&lt;br&gt;
const koalasScore2 = 34;&lt;br&gt;
const koalasScore3 = 27;&lt;/p&gt;

&lt;p&gt;const calcAverage = (score1, score2, score3) =&amp;gt; (score1 + score2 + score3) / 3;&lt;/p&gt;

&lt;p&gt;const checkWinner = function () {&lt;br&gt;
  const avgDolphins = calcAverage(dolphinsScore1, dolphinsScore2, dolphinsScore3)&lt;br&gt;
  const avgKoalas = calcAverage(koalasScore1, koalasScore2, koalasScore3)&lt;br&gt;
  if (avgDolphins &amp;gt;= (2 * avgKoalas)) {&lt;br&gt;
    return &lt;code&gt;Dolphins win (${avgDolphins} vs ${avgKoalas})&lt;/code&gt;&lt;br&gt;
  } else if (avgKoalas &amp;gt;= (2 * avgDolphins)) {&lt;br&gt;
    return &lt;code&gt;Koalas win (${avgKoalas} vs ${avgDolphins})&lt;/code&gt;&lt;br&gt;
  } else {&lt;br&gt;
    return &lt;code&gt;No winners.&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;}&lt;br&gt;
}&lt;br&gt;
const winner = checkWinner();&lt;br&gt;
console.log(winner)&lt;br&gt;
console.log(calcAverage(koalasScore1, koalasScore2, koalasScore3))&lt;br&gt;
console.log(calcAverage(dolphinsScore1, dolphinsScore2, dolphinsScore3))&lt;/p&gt;

&lt;p&gt;//CodingChallenge2&lt;br&gt;
//Arrays&lt;br&gt;
const calcTip = function (bill) {&lt;br&gt;
  const tip = 50 &amp;lt; bill &amp;amp;&amp;amp; bill &amp;lt; 300 ? (.15 * bill) : (.20 * bill)&lt;br&gt;
  return tip&lt;br&gt;
}&lt;br&gt;
console.log(calcTip(100))&lt;br&gt;
const bills = [125, 555, 44]&lt;br&gt;
const tips = [calcTip(bills[0]), calcTip(bills[1]), calcTip(bills[2])]&lt;br&gt;
console.log(tips)&lt;br&gt;
const total = [bills[0] + tips[0], bills[1] + tips[1], bills[2] + tips[2]]&lt;br&gt;
console.log(total)&lt;/p&gt;

&lt;p&gt;//CodingChallenge3&lt;br&gt;
//Objects&lt;br&gt;
const markInfo = {&lt;br&gt;
  fullName: 'Mark Miller',&lt;br&gt;
  mass: 78,&lt;br&gt;
  height: 1.69,&lt;br&gt;
  calcBMI: function () {&lt;br&gt;
    this.bmi = (this.mass) / (this.height ** 2)&lt;br&gt;
    return this.bmi&lt;br&gt;
  }&lt;br&gt;
}&lt;br&gt;
const johnInfo = {&lt;br&gt;
  fullName: 'John Smith',&lt;br&gt;
  mass: 92,&lt;br&gt;
  height: 1.95,&lt;br&gt;
  calcBMI: function () {&lt;br&gt;
    this.bmi = (this.mass) / (this.height ** 2)&lt;br&gt;
    return this.bmi&lt;br&gt;
  }&lt;br&gt;
}&lt;br&gt;
// console.log(markInfo, johnInfo)&lt;br&gt;
// markBMI = markInfo.calcBMI()&lt;br&gt;
// johnBMI = johnInfo.calcBMI()&lt;br&gt;
// console.log(markInfo, johnInfo)&lt;br&gt;
if (markInfo.calcBMI() &amp;gt; johnInfo.calcBMI()) { //We could have also used markInfo.bmi and johnInfo.bmi instead of calling the method in the if else statements.&lt;br&gt;
  console.log(&lt;code&gt;Marks's BMI (${markInfo.calcBMI()}) is higher than John's (${johnInfo.calcBMI()}))&lt;/code&gt;)&lt;br&gt;
} else {&lt;br&gt;
  console.log(&lt;code&gt;John's BMI (${johnInfo.calcBMI()}) is higher than Marks's (${markInfo.calcBMI()}))&lt;/code&gt;)&lt;br&gt;
}&lt;br&gt;
*/&lt;br&gt;
//CodingChallenge4&lt;br&gt;
const bills = [22, 295, 176, 440, 37, 105, 10, 1100, 86, 52];&lt;br&gt;
const tips = [];&lt;br&gt;
const totals = [];&lt;/p&gt;

&lt;p&gt;const calcTip = function (bill) {&lt;br&gt;
  const tip = 50 &amp;lt; bill &amp;amp;&amp;amp; bill &amp;lt; 300 ? (.15 * bill) : (.20 * bill)&lt;br&gt;
  return tip&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;for (i = 0; i &amp;lt; bills.length; i++) {&lt;br&gt;
  const tip = calcTip(bills[i])&lt;br&gt;
  tips.push(tip)&lt;br&gt;
  totals.push((tip) + bills[i])&lt;br&gt;
}&lt;br&gt;
console.log(tips, totals)&lt;/p&gt;

&lt;p&gt;const calcAverage = function (arr) {&lt;br&gt;
  let sum = 0&lt;br&gt;
  for (let i = 0; i &amp;lt; arr.length; i++) {&lt;br&gt;
    sum = sum + arr[i]&lt;br&gt;
  }&lt;br&gt;
  return &lt;code&gt;Average is ${sum / arr.length}&lt;/code&gt;&lt;br&gt;
}&lt;br&gt;
console.log(calcAverage(totals));&lt;/p&gt;

&lt;p&gt;// Remember, we're gonna use strict mode in all scripts now!&lt;br&gt;
'use strict';&lt;br&gt;
//CodingChallenge1&lt;br&gt;
//Developer skills&lt;br&gt;
//Steps:&lt;br&gt;
//1)Create the array&lt;br&gt;
//2)form the string using loop and counter&lt;br&gt;
//3)log it to the console&lt;br&gt;
const printForecast= function(arr){&lt;br&gt;
  let str=""&lt;br&gt;
  for (let i=0;i&amp;lt;arr.length;i++){&lt;br&gt;
     str=str+&lt;code&gt;...${arr[i]} degree Celcius in ${i+1} days&lt;/code&gt;&lt;br&gt;
  }&lt;br&gt;
  return str=str+"..."&lt;br&gt;
}&lt;br&gt;
console.log(printForecast([12,5,-5,0,4]));&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Section 01: JavaScript Fundamentals</title>
      <dc:creator>hex-paradus</dc:creator>
      <pubDate>Sun, 08 Aug 2021 04:10:12 +0000</pubDate>
      <link>https://forem.com/hexparadus/section01-fundamentals-1lff</link>
      <guid>https://forem.com/hexparadus/section01-fundamentals-1lff</guid>
      <description>&lt;p&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;br&gt;
&lt;/p&gt;


&lt;br&gt;
  &lt;br&gt;
  &lt;br&gt;
  &lt;br&gt;
  JavaScript Fundamentals – Part 1&lt;br&gt;
  &amp;lt;br&amp;gt;
    body {&amp;lt;br&amp;gt;
      height: 100vh;&amp;lt;br&amp;gt;
      display: flex;&amp;lt;br&amp;gt;
      align-items: center;&amp;lt;br&amp;gt;
      background: linear-gradient(to top left, #28b487, #7dd56f);&amp;lt;br&amp;gt;
    }&amp;lt;/p&amp;gt;
&amp;lt;div class="highlight"&amp;gt;&amp;lt;pre class="highlight plaintext"&amp;gt;&amp;lt;code&amp;gt;h1 {
  font-family: sans-serif;
  font-size: 50px;
  line-height: 1.3;
  width: 100%;
  padding: 30px;
  text-align: center;
  color: white;
}
&amp;lt;/code&amp;gt;&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;
&amp;lt;p&amp;gt;




&lt;br&gt;
  &lt;h1&gt;I AM SORRY :(.&lt;/h1&gt;
&lt;br&gt;
  &lt;br&gt;
  &lt;br&gt;




&lt;p&gt;//Assingment1&lt;br&gt;
/*&lt;br&gt;
let country = "Bangladesh";&lt;br&gt;
let continent = "Asia";&lt;br&gt;
let population = "20 Million";&lt;br&gt;
console.log(country);&lt;br&gt;
console.log(continent);&lt;br&gt;
console.log(population);&lt;/p&gt;

&lt;p&gt;//Assigment2&lt;/p&gt;

&lt;p&gt;//let isIsland = false;&lt;br&gt;
// let language;&lt;br&gt;
// console.log(typeof country)&lt;br&gt;
// console.log(typeof continent)&lt;br&gt;
// console.log(typeof population)&lt;br&gt;
// console.log(typeof language)&lt;br&gt;
// console.log(typeof isIsland)&lt;/p&gt;

&lt;p&gt;//Assingment3&lt;br&gt;
let language;&lt;br&gt;
language="Bangla"&lt;br&gt;
let population=200000000&lt;br&gt;
const country="Bangladesh"&lt;br&gt;
const continent="Asia"&lt;br&gt;
const isIsland=false&lt;br&gt;
//isIsland=true&lt;br&gt;
//Assigment4&lt;br&gt;
let countryFirstHalf=population/2&lt;br&gt;
let countrySecondHalf=population/2&lt;br&gt;
console.log(population+1)&lt;br&gt;
let finlandPopulation=6000000&lt;br&gt;
console.log(population&amp;gt;finlandPopulation)&lt;br&gt;
let averagePopulation=33000000&lt;br&gt;
console.log(population&amp;lt;averagePopulation)&lt;br&gt;
let description=(country+" is in "+continent+", and its "+population/1000000+" million people speak "+language)&lt;br&gt;
console.log(description)&lt;br&gt;
//Assingment5&lt;br&gt;
description= &lt;code&gt;${country} is in ${continent}, and its ${population/1000000} million people  speak ${language} language.&lt;/code&gt;&lt;br&gt;
console.log(description)&lt;/p&gt;

&lt;p&gt;//Assingment6&lt;br&gt;
if (population&amp;gt;33){&lt;br&gt;
  console.log("Portugal's population is above average")&lt;br&gt;
} else {&lt;br&gt;
  console.log(&lt;code&gt;Portugal's population is ${33-population} million below average&lt;/code&gt;)&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;//Assingement6&lt;br&gt;
// numNeighbours=Number(prompt(&lt;code&gt;How many neighbour countries does your country have?&lt;/code&gt;))&lt;br&gt;
// if (numNeighbours===1){&lt;br&gt;
//   console.log(&lt;code&gt;Only 1 border.&lt;/code&gt;)&lt;br&gt;
// }else if (numNeighbours&amp;gt;1) {&lt;br&gt;
//   console.log(&lt;code&gt;More than 1 border.&lt;/code&gt;)&lt;br&gt;
// }else {&lt;br&gt;
//   console.log(&lt;code&gt;No borders.&lt;/code&gt;)&lt;br&gt;
// }&lt;/p&gt;

&lt;p&gt;//Assingment7&lt;br&gt;
if (language==="English" &amp;amp;&amp;amp; !population&amp;lt;5000000 &amp;amp;&amp;amp; !isIsland){    // Double == has inbuult type coercion but === does not have it&lt;br&gt;
  console.log(&lt;code&gt;You should live in ${country} :).&lt;/code&gt;)&lt;br&gt;
}else {&lt;br&gt;
  console.log(&lt;code&gt;${country} does not meet your criteria :(.&lt;/code&gt;)&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;//Assingment8&lt;br&gt;
language=&lt;code&gt;Chinese or Mandarin&lt;/code&gt;;&lt;/p&gt;

&lt;p&gt;switch (language) {&lt;br&gt;
  case "Chinese or Mandarin":&lt;br&gt;
    console.log(&lt;code&gt;Most number of native speakers!&lt;/code&gt;)&lt;br&gt;
    break&lt;br&gt;
  case &lt;code&gt;Spanish&lt;/code&gt;:&lt;br&gt;
    console.log(&lt;code&gt;2nd place in number of native speakers.&lt;/code&gt;)&lt;br&gt;
    break&lt;br&gt;
  case &lt;code&gt;English&lt;/code&gt;:&lt;br&gt;
      console.log(&lt;code&gt;3rd place.&lt;/code&gt;)&lt;br&gt;
    break&lt;br&gt;
  case &lt;code&gt;Hindi&lt;/code&gt;:&lt;br&gt;
     console.log(&lt;code&gt;Number 4.&lt;/code&gt;)&lt;br&gt;
    break&lt;br&gt;
  case &lt;code&gt;Arabic&lt;/code&gt;:&lt;br&gt;
      console.log(&lt;code&gt;5th most spoken language.&lt;/code&gt;)&lt;br&gt;
    break&lt;br&gt;
  default:&lt;br&gt;
    console.log(&lt;code&gt;Great language too :D.&lt;/code&gt;)&lt;br&gt;
}&lt;br&gt;
//Assingment9&lt;br&gt;
let population=200&lt;/p&gt;

&lt;p&gt;// population&amp;gt;33 ? console.log(&lt;code&gt;Portugal's population is above average.&lt;/code&gt;): console.log(&lt;code&gt;Portugal's population is below average.&lt;/code&gt;)&lt;/p&gt;

&lt;p&gt;//It's actually used like this&lt;br&gt;
console.log(&lt;code&gt;Bangladesh's population is ${population&amp;gt;33 ? 'above':'below'} average&lt;/code&gt;)&lt;br&gt;
*/&lt;/p&gt;

&lt;p&gt;/*&lt;br&gt;
//CodingChallenge1&lt;br&gt;
let markMass=78&lt;br&gt;
let markHeight=1.69&lt;br&gt;
let  johnMass=92&lt;br&gt;
let johnHeight=1.95&lt;br&gt;
let markMass=95&lt;br&gt;
let markHeight=1.88&lt;br&gt;
let  johnMass=85&lt;br&gt;
let johnHeight=1.76&lt;/p&gt;

&lt;p&gt;let markBMI= markMass/(markHeight **2)&lt;br&gt;
let johnBMI= johnMass/(johnHeight **2)&lt;br&gt;
console.log(markBMI,johnBMI)&lt;br&gt;
const markHigherBMI=(markBMI&amp;gt;johnBMI)&lt;br&gt;
console.log(markHigherBMI)&lt;br&gt;
 //CodingChallenge2&lt;br&gt;
 if(markBMI&amp;gt;johnBMI){&lt;br&gt;
   console.log(&lt;code&gt;Mark's BMI(${markBMI}) is higher than Johns!(${johnBMI})&lt;/code&gt;)}&lt;br&gt;
  else{&lt;br&gt;
     console.log(&lt;code&gt;John's BMI(${johnBMI}) is higher than Mark!(${markBMI})&lt;/code&gt;)}&lt;/p&gt;

&lt;p&gt;//CodingChallenge3&lt;br&gt;
dolphinsMatch1=97&lt;br&gt;
dolphinsMatch2=112&lt;br&gt;
dolphinsMatch3=101&lt;br&gt;
koalasMatch1=109&lt;br&gt;
koalasMatch2=95&lt;br&gt;
koalasMatch3=106&lt;/p&gt;

&lt;p&gt;dolphinsAverage=(dolphinsMatch1+dolphinsMatch2&lt;br&gt;
+dolphinsMatch3)/3&lt;br&gt;
koalasAverage=(koalasMatch1+koalasMatch2+koalasMatch3)/3&lt;br&gt;
console.log("Dolphins average = "+dolphinsAverage)&lt;br&gt;
console.log("Koalas Average = "+koalasAverage)&lt;br&gt;
if (dolphinsAverage&amp;gt;koalasAverage &amp;amp;&amp;amp; dolphinsAverage&amp;gt;100){&lt;br&gt;
  console.log(&lt;code&gt;Dolphins are the winner!&lt;/code&gt;)&lt;br&gt;
}else if (dolphinsAverage===koalasAverage &amp;amp;&amp;amp; dolphinsAverage&amp;gt;=100 &amp;amp;&amp;amp; koalasAverage&amp;gt;=100){&lt;br&gt;
  console.log(&lt;code&gt;The match is a draw!&lt;/code&gt;)&lt;br&gt;
}&lt;br&gt;
else  if (koalasAverage&amp;gt;dolphinsAverage &amp;amp;&amp;amp; koalasAverage&amp;gt;100){&lt;br&gt;
  console.log(&lt;code&gt;Koalas are the winner!&lt;/code&gt;)&lt;br&gt;
}else{&lt;br&gt;
  console.log(&lt;code&gt;There is no winner :(.&lt;/code&gt;)&lt;br&gt;
}&lt;br&gt;
*/&lt;br&gt;
//CodingChallenge4&lt;br&gt;
let bill =40&lt;br&gt;
let tip = 50&amp;lt;bill &amp;amp;&amp;amp; bill&amp;lt;300 ? (.15*bill):(.20*bill)&lt;br&gt;
console.log(&lt;code&gt;The bill was ${bill}, the tip was ${tip} and the total value was ${bill+tip}&lt;/code&gt;)&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
