Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

Javascript Area When Base and Height is Known

const baseValue = prompt('Enter the base of a triangle: ');
const heightValue = prompt('Enter the height of a triangle: ');

// calculate the area
const areaValue = (baseValue * heightValue) / 2;

console.log(
  `The area of the triangle is ${areaValue}`
);
Comment

PREVIOUS NEXT
Code Example
Javascript :: empty or remove div span class 
Javascript :: auto load in element show 
Javascript :: routing/switches 
Javascript :: javascript for website design center text 
Javascript :: array operations = map, filter, find, reduce, some, every, indexOf 
Javascript :: NodeJS Database initialisation 
Javascript :: Accessing Function Declared Outside Constructor But Inside Class 
Javascript :: how to broadcast to the entire room scket io 
Javascript :: check if first array contains all elements javascript 
Javascript :: Hardhat config file multiple network 
Javascript :: ahead-of-time (AOT) compilation 
Javascript :: function titleCase 2 
Javascript :: check token balance of an address in js 
Javascript :: Validation Script Rule 
Javascript :: Backbone Notes Miscellaneous 
Javascript :: Backbone Model Fetch 
Javascript :: Backbone Add To Collection 
Javascript :: React Gotchas 
Javascript :: Backbone Collection Example 
Javascript :: var date = new Date(); 
Javascript :: axios response error interceptor 
Javascript :: var vs let javascript 
Javascript :: javascript alarm 
Javascript :: how to remove duplicates in js 
Javascript :: calculate jwt expire time 
Javascript :: how to reverse sort lines in javascript 
Javascript :: inappbrowser hide url 
Javascript :: javascript function expressions 
Javascript :: javascript remaining elements of an array to a variable using the spread syntax 
Javascript :: JavaScript HTML DOM Node Lists 
ADD CONTENT
Topic
Content
Source link
Name
4+3 =