JavaScript Functions

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/9

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

10 Terms

1
New cards

alert()

shows an alert box

alert(“Hello!)

2
New cards

prompt()

asks for user input

let name = prompt(“Enter name”)

3
New cards

console.log()

prints to console duh

4
New cards

typeof

checks variable type

typeof 42 // “number”

5
New cards

parseInt()

converts string → int

parseInt(“42”) // 42

6
New cards

parseFloat()

converts string → float

parseFloat(“3.13”) // 3.13

7
New cards

Number()

converts to number

Number(“5”) // 5

8
New cards

String()

converts to string

String(5) // "5"

9
New cards

.length

returns length

“hi”.length // 2

10
New cards