Learn JavaScript TYPE CONVERSION in 5 minutes! 💱
Bro Code
•
October 18, 2023
Bro Code
@brocodezAbout
Coding bootcamps HATE HIM! 🗿
Latest Posts
Video Description
// type conversion = change the datatype of a value to another // (strings, numbers, booleans) // --------------- EXAMPLE 1 --------------- let age = window.prompt("How old are you?"); age = Number(age); age+=1; console.log(age, typeof age); // --------------- EXAMPLE 2 --------------- let x = "pizza"; let y = "pizza"; let z = "pizza"; x = Number(x); y = String(y); z = Boolean(z); console.log(x, typeof x); console.log(y, typeof y); console.log(z, typeof z);
You May Also Like
Essential Slime Making Kits
AI-recommended products based on this video
Loading...

Pink Unicorn Carrying Case Compatible with Nintendo Switch Lite with Crystal Glitter Soft Protective Case Cover+Screen Protector+Stickers, Hard Storage Case Accessories Kit for Girls Birthday Gift
(2,003)
$37.40
PrimeFREE delivery Mon, Jun 16
Loading...

GuaGua for Galaxy S25 Case Samsung S25 Case Glow in The Dark Noctilucent Luminous Cover Space Nebula Slim Thin Shockproof Protective Phone Cases for Samsung S25, Purple/Blue
(18)
$13.86
FREE delivery Sat, Jun 14 on your first order
50+ bought in past month



















