07:31Type conversion in JavaScript 💱【4 minutes】
From the creator
#Javascript #type #conversion // type conversion = change the datatype of a value to another // (strings, numbers, booleans) let age = window.prompt("How old are you?"); console.log(typeof age); age = Number(age); age += 1; console.log("Happy Birthday! You are", age, "years old"); /* let x; let y; let z; x = Number("pizza"); y = String(3.14); z = Boolean("pizza"); console.log(x, typeof x); console.log(y, typeof y); console.log(z, typeof z); */
Published 2022-04-19 · Watch on YouTube ↗
Availability and playback restrictions are controlled by the original channel.





