Posts

Showing posts from October, 2023

Js tasks

  1: Create a function that takes two numbers as parameters and returns their sum. JS: // Create a function that takes two numbers as parameters and returns their sum. const button = document . querySelector ( " button " ) ; function sum ( one , two ) {     return one + two ; } button . addEventListener ( " click " , () => {         let $i1 = document . querySelector ( " #i1 " ) . value ;     let $i2 = document . querySelector ( " #i2 " ) . value ;     let area = sum ( Number ($i1) , Number ($i2)) ;         console . log ( " Sum: " , area) ; } ) HTML: < body class =" mx-3 ">     < section class =" flex gap-10 pb-7 ">         < div >             < p > Input : 1 </ p >< input id =" i1 " class =" border-2 " type =" text " required >         </ div >     ...

API used in Project

Table of contents: Weather app 1. Weather app: https: //openweathermap.org/ api key => 8172555a7c0dd29c40cb373ff1c73e51 api call => https: //api.openweathermap.org/data/2.5/weather?lat={lat}&lon={lon}&appid={API key} >