var | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

var

ctx=c.getContext("2d"); can someone kindly help me find out what is the 2d stand for?why we can't put another number in? and is the var stand for values? thanks to every teacher.

5th Aug 2016, 6:32 AM
Kemp
Kemp - avatar
4 Answers
+ 2
2d is 2 dimentions. you can use getContext('webgl'). var is a variable, a variabla recive a value. this value can be a number, string etc
5th Aug 2016, 7:06 AM
Felipe Medeiros
Felipe Medeiros - avatar
+ 1
what is getContext('webgl'). sorry?
5th Aug 2016, 7:25 AM
Kemp
Kemp - avatar
0
it is 3d
5th Aug 2016, 7:30 AM
Felipe Medeiros
Felipe Medeiros - avatar
0
he just want to make things more complicated just use 2d because we are in HTML i mean you have just two coordinates(x,y) not Autocad to use 3d or cinema4d.
7th Oct 2016, 9:33 PM
Otmane Guourch
Otmane Guourch - avatar