JavaScript Prompt Function

  Рет қаралды 12,711

MisterBrash

MisterBrash

Күн бұрын

Пікірлер: 10
@abenezertadesse-l6g
@abenezertadesse-l6g 3 ай бұрын
nice bro keep it up😘😍
@AL-hk3oo
@AL-hk3oo 2 жыл бұрын
nice video, exactly what I'm looking for
@phan4842
@phan4842 10 ай бұрын
man thats a great video, deserves a like!
@ginstones4252
@ginstones4252 2 жыл бұрын
Can I please get the link of the next video you are referring to?
@MisterBrash
@MisterBrash 2 жыл бұрын
I don't believe I ever made a follow-up video to this one. This was a video I made for a class back in 2020 but essentially you want to use an if-statement and the isNaN( ) function. The isNaN( ) function will return TRUE if the input is NOT a number. A bit confusing, but let's say you have a variable "input" and you want to know if the variable is NOT a number - you have two choices (there are more but these are easy). Option A: if (typeof input != 'number') this will return true if the variable is NaN. Option B: if (isNaN(input)) This does the same thing. Seeing code like this in a KZbin comment is difficult, I know, but do some Googling for isNaN( ) and using if-statements to check if a variable is a number or not.
@benzona1503
@benzona1503 2 жыл бұрын
clean af 🤌
@yayeettt
@yayeettt 3 жыл бұрын
in short use parseInt :D
@MisterBrash
@MisterBrash 3 жыл бұрын
Sure - but this was for my intro to programming class that I teach at a high school (14 years-old). So we take it very slowly and learn in small chunks. This particular video was specifically in response to some questions I was receiving as we learned how to receive input from the user. Now in terms of your comment about "just use parseInt" that's also not exactly true because it would depend on what you are trying to gather from the user. For example - what if you don't specifically want a whole number? What if you are allowing decimals? People who know JavaScript tend to say "Just do this" but it doesn't explain WHY. The goal when teaching someone is not to give blanket "just do" statements. It's important that people understand the WHY or they'll just use that thing and not really understand the point behind it.
@yayeettt
@yayeettt 3 жыл бұрын
@@MisterBrash oh yeah I totally understand tho i have teacher that does that 🤔
@osmalflopez8877
@osmalflopez8877 11 ай бұрын
True teacher response. My math teachers hated me for asking why to everything, but that's the only way to truly understand what you're doing and actually learn.@@MisterBrash
Урок JavaScript №7 - Консоль и prompt/confirm | Курс FrontEnd 2021
12:48
Фронтенд от Палыча
Рет қаралды 3,7 М.
JavaScript Functions Crash Course
1:36:54
freeCodeCamp.org
Рет қаралды 187 М.
When Cucumbers Meet PVC Pipe The Results Are Wild! 🤭
00:44
Crafty Buddy
Рет қаралды 49 МЛН
ЛУЧШИЙ ФОКУС + секрет! #shorts
00:12
Роман Magic
Рет қаралды 39 МЛН
Trapped by the Machine, Saved by Kind Strangers! #shorts
00:21
Fabiosa Best Lifehacks
Рет қаралды 40 МЛН
За кого болели?😂
00:18
МЯТНАЯ ФАНТА
Рет қаралды 2,7 МЛН
How to take User Input using Prompt Sync in JavaScript Node JS
9:04
Example Program
Рет қаралды 52 М.
5 Tips for Writing BETTER For Loops in JavaScript
16:15
James Q Quick
Рет қаралды 70 М.
JavaScript Functions
5:38
Programming with Mosh
Рет қаралды 444 М.
Build this JS calculator in 15 minutes! 🖩
15:20
Bro Code
Рет қаралды 656 М.
Winning Facebook (Meta) Hacker Cup Qual Round 2022?
53:55
Neal Wu
Рет қаралды 2,6 МЛН
Javascript - 'prompt' ֆունկցիա
7:50
meschian
Рет қаралды 53 М.
File Access Basics | C Programming Tutorial
24:05
Portfolio Courses
Рет қаралды 98 М.
5 JavaScript Concepts You HAVE TO KNOW
9:38
James Q Quick
Рет қаралды 1,4 МЛН
Learn JSON in 10 Minutes
12:00
Web Dev Simplified
Рет қаралды 3,2 МЛН
When Cucumbers Meet PVC Pipe The Results Are Wild! 🤭
00:44
Crafty Buddy
Рет қаралды 49 МЛН