Posts

Showing posts from April, 2024

Palindrome with js

PALINDROME WITH JS VIDEO LINK: https://youtu.be/t9-wqbzvATE?si=7QkvRMDnImKZNRx1 What is palindrome in first place? -> a word,phrase,or sequence that reads the same backwards as forwards.eg: madam HTML CODE: <! DOCTYPE html > < html lang = "en" > < head >     < meta charset = "UTF-8" >     < meta name = "viewport" content = "width=device-width, initial-scale=1.0" >     < title >Document</ title > </ head > < body >     < h1 >Hello World</ h1 >     < input type = "text" class = "input" >     < button class = "btn" >Click me</ button > </ body > < script src = "palindrome.js" ></ script > </ html >  JAVASCRIPT CODE: btn = document . querySelector ( '.btn' ); btn. addEventListener ( "click" , () => {     input = document . querySelector ( '.input' );     a = in...