Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How is JavaScript syntax like C / C++?

Javascript syntax
0
Posted

How is JavaScript syntax like C / C++?

0

The languages have enough in common to make learning one easy if you know the other. By the same token, the differences are subtle enough to trip up those proficient in both. Here’s a short list comparing C and JavaScript: • Terminating JavaScript command lines in semicolons is optional; in C it’s mandatory. Recommended practice is to use them religiously in both languages (and Java as well). • Both JavaScript and C are case-sensitive; ‘doThis’ is different from ‘DOTHIS’. Experienced programmers learn to love this feature, which drives beginners nuts. • Both JavaScript and C are block-structured computer languages and employ curly brackets — ‘{‘ and ‘}’ — to delimit blocks. • Both JavaScript and C employ quotation — enclosure in single or double quote marks — to designate text strings. • Arrays in both JavaScript and C are zero-based; the first element is myArray[0], not myArray[1]. • Both JavaScript and C employ ‘==’ for comparison, ‘=’ for equality, and ‘!’ for negation. In fact

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123