Skip to content
Permalink
Fetching contributors…
Cannot retrieve contributors at this time
66 lines (41 sloc) 1.85 KB

Homework: Data types and Variables

Tasks marked with * require additional knowledge or some research

==================================

01. JavaScript literals

Description

Assign all the possible JavaScript literals to different variables.

Submission

  • You do not have to submit anything for this problem

02. Quoted text

Description

Create a string variable with quoted text in it. For example: 'How you doin'?', Joey said'.

Submission

  • You do not have to submit anything for this problem

03. Typeof variables

Description

Try typeof on all variables you created.

Submission

  • You do not have to submit anything for this problem

04. Typeof null

Description

Create null, undefined variables and try typeof on them.

Submission

  • You do not have to submit anything for this problem

05. Parsing numbers

Description

Try parsing the following strings to numbers using parseInt, parseFloat, Number, + and | 0. Fill the answers for yourself in the table below.

str parseInt(str) parseFloat(str) Number(str) +str str | 0
'1234' ? ? ? ? ?
'1238abc' ? ? ? ? ?
'0.15' ? ? ? ? ?
'3.14ivan' ? ? ? ? ?
'Infinity' ? ? ? ? ?
'99999999999999999999' ? ? ? ? ?

Submission

  • You do not have to submit anything for this problem.
You can’t perform that action at this time.