SlideShare uma empresa Scribd logo
1 de 7
Baixar para ler offline
1/7
Post author By Charlie September 2, 2022
7 Simple Things I Learned about JavaScript
theweeklyrambler.com/7-simple-things-i-learned-about-javascript/
Featured photo: Image by Alltechbuzz_net from Pixabay
Hello all. Another weekend is upon us! Hope you all had a great week. Today I thought I’d
go over a few little simple but interesting things I learned from JavaScript (so far). I am no
expert in the language – yet at least – but I have come across some interesting little facts
that I wanted to share.
1. The JavaScript Engine
2/7
Image by Michael Schwarzenberger from Pixabay
One of the first things I learned about was the JavaScript Engine and how it is different
from one browser to the next. The names of these are important for developers to know
so they can keep up to date about the latest JavaScript support for the browsers they
use.
Some of these include V8 which is used by Google Chrome, Opera and Microsoft Edge.
SpiderMonkey used by Firefox.
And Chakra used by Internet Explorer… not that this one is really relevant anymore.
2. Languages can Transpile to other Languages
3/7
Image by PopcornSusanN from Pixabay
What this means is you can use a different language that may use syntax you prefer to
write code in that can then be transpiled into JavaScript so you don’t actually have to
write the JavaScript yourself.
It also has barely any impact on performance so there is little downside. Such languages
that can transpile to JS include…
TypeScript which is developed by Microsoft.
Flow which is developed by Facebook Inc (or Meta as it is called now).
Brython – which transpiles Python code – which is one that sounds most interesting
to me as I am interested in also learning Python.
3. The JavaScript Standard
4/7
The gold standard. Image by Steve Bidmead from Pixabay
The specification for JavaScript is ECMA-262 which you can read here. It is an in-depth
dive into the language and which fully defines it. Although it basically includes anything
you may want to know on JS – it is not for quick reference. Instead developer.mozilla is
better for that.
You can also go to this GitHub page here to see proposals for JS – new features that
have not yet reached Stage 4 (where they officially become part of ECMA-262).
4. Best Browsers for JavaScript Development
5/7
Image by Photo Mix from Pixabay
Many browsers include their own development tools to support JavaScript development.
Such tools can be found by right-clicking and selecting ‘Inspect’ which brings up a
console which can be used for debugging among other things.
Most developers consider Firefox and Google Chrome to have the best developer tools
for JS support.
5. The Script Tag
Image by Boskampi from Pixabay
6/7
The Script tag – <script></script> is what is used to insert JS functionality into HTML (a
markup language for structuring content on websites). Usually this is done by placing
either a .js file or a url that contains the written JS.
But you can also write actual JS code within the tag as well (which I did not know
beforehand). But it is to be noted this is rarely done since it can get messy if there is too
much script (which there normally is a lot). Usually it is better to have it all organised in a
file that is linked to the tag either by an absolute path or relative path.
Linking to a JS file or URL is also better for page load times – this is because the browser
will download it once and then store it in cache – rather than downloading it every time
when it is just written directly in the tag.
6. Semicolon Fun
Image by fancycrave1 from Pixabay
A semicolon is usually placed at the end of a line of JS code so the engine can run the
code correctly without errors.
But semicolons can be omitted when a line break exists as the engine will add an ‘implicit
semicolon’ itself. But it is suggested not to do this as sometimes the engine makes a
mistake and doesn’t insert one where it is supposed to go – causing a hard to locate
error.
As well as that code that has visible semicolons in the right places is also just easier to
read and looks nicer.
7/7
7. Strict Mode
Strict as a ruler? Image by 2541163 from Pixabay
Once upon a time any new updates to JS would merely add new features while leaving
older features untouched (some of which later become deprecated – which means don’t
use them anymore although you still can if you really want to).
Anyway – this meant that compatibility issues were not really a thing in JS. That was until
2009 when ECMAScript5 altered/modified some existing features.
But there was an immediate solution to this – Strict Mode. Unless Strict Mode has been
explicitly enabled for some code the engine will just treat it as if any
alteration/modifications that had been introduced are not there.
Enabling Strict Mode is done just by putting “use strict”; above the code you want it to
affect, or you can nest it in a function if you only want it to affect that one function.
I’ll stop there for now. But I do have more I’ll share in the future. I am looking forward to
continuing my JavaScript journey.
Thank you for reading this post, if you have any queries please Email me, you can find
my Email in the Contacts & Community section. Please also follow The Weekly Rambler
on Twitter, Reddit, Pinterest and Facebook which you can access through the buttons at
the bottom of this website. You can also use the social media buttons under each
blogpost to share with your family, friends and associates.

Mais conteúdo relacionado

Semelhante a 7 Simple Things I Learned about JavaScript

The best way to learn java script
The best way to learn java scriptThe best way to learn java script
The best way to learn java scriptWei Sun
 
Getting Started in Custom Programming for Talent Sourcing
Getting Started in Custom Programming for Talent SourcingGetting Started in Custom Programming for Talent Sourcing
Getting Started in Custom Programming for Talent SourcingGlenn Gutmacher
 
Web driver selenium simplified
Web driver selenium simplifiedWeb driver selenium simplified
Web driver selenium simplifiedVikas Singh
 
Winter%200405%20-%20Advanced%20Javascript
Winter%200405%20-%20Advanced%20JavascriptWinter%200405%20-%20Advanced%20Javascript
Winter%200405%20-%20Advanced%20Javascripttutorialsruby
 
Winter%200405%20-%20Advanced%20Javascript
Winter%200405%20-%20Advanced%20JavascriptWinter%200405%20-%20Advanced%20Javascript
Winter%200405%20-%20Advanced%20Javascripttutorialsruby
 
Untangling spring week8
Untangling spring week8Untangling spring week8
Untangling spring week8Derek Jacoby
 
AtlasCamp 2011 - Five Strategies to Accelerate Plugin Development
AtlasCamp 2011 - Five Strategies to Accelerate Plugin DevelopmentAtlasCamp 2011 - Five Strategies to Accelerate Plugin Development
AtlasCamp 2011 - Five Strategies to Accelerate Plugin Developmentmrdon
 
Lunch and learn as3_frameworks
Lunch and learn as3_frameworksLunch and learn as3_frameworks
Lunch and learn as3_frameworksYuri Visser
 
Front-End Modernization for Mortals
Front-End Modernization for MortalsFront-End Modernization for Mortals
Front-End Modernization for Mortalscgack
 
Front end-modernization
Front end-modernizationFront end-modernization
Front end-modernizationdevObjective
 
We continue checking Microsoft projects: analysis of PowerShell
We continue checking Microsoft projects: analysis of PowerShellWe continue checking Microsoft projects: analysis of PowerShell
We continue checking Microsoft projects: analysis of PowerShellPVS-Studio
 
Understanding progressive enhancement - yuiconf2010
Understanding progressive enhancement - yuiconf2010Understanding progressive enhancement - yuiconf2010
Understanding progressive enhancement - yuiconf2010Christian Heilmann
 
Selecting the Best Javascript Web Framework
Selecting the Best Javascript Web FrameworkSelecting the Best Javascript Web Framework
Selecting the Best Javascript Web FrameworkRajitha Pathiraja
 
Front-End 개발의 괜찮은 선택 ES6 & React
Front-End 개발의 괜찮은 선택  ES6 & ReactFront-End 개발의 괜찮은 선택  ES6 & React
Front-End 개발의 괜찮은 선택 ES6 & React지수 윤
 

Semelhante a 7 Simple Things I Learned about JavaScript (20)

The best way to learn java script
The best way to learn java scriptThe best way to learn java script
The best way to learn java script
 
Getting Started in Custom Programming for Talent Sourcing
Getting Started in Custom Programming for Talent SourcingGetting Started in Custom Programming for Talent Sourcing
Getting Started in Custom Programming for Talent Sourcing
 
Web driver selenium simplified
Web driver selenium simplifiedWeb driver selenium simplified
Web driver selenium simplified
 
Winter%200405%20-%20Advanced%20Javascript
Winter%200405%20-%20Advanced%20JavascriptWinter%200405%20-%20Advanced%20Javascript
Winter%200405%20-%20Advanced%20Javascript
 
Winter%200405%20-%20Advanced%20Javascript
Winter%200405%20-%20Advanced%20JavascriptWinter%200405%20-%20Advanced%20Javascript
Winter%200405%20-%20Advanced%20Javascript
 
Untangling spring week8
Untangling spring week8Untangling spring week8
Untangling spring week8
 
AtlasCamp 2011 - Five Strategies to Accelerate Plugin Development
AtlasCamp 2011 - Five Strategies to Accelerate Plugin DevelopmentAtlasCamp 2011 - Five Strategies to Accelerate Plugin Development
AtlasCamp 2011 - Five Strategies to Accelerate Plugin Development
 
Lunch and learn as3_frameworks
Lunch and learn as3_frameworksLunch and learn as3_frameworks
Lunch and learn as3_frameworks
 
Meteorjs
MeteorjsMeteorjs
Meteorjs
 
Meteorjs
MeteorjsMeteorjs
Meteorjs
 
Front-End Modernization for Mortals
Front-End Modernization for MortalsFront-End Modernization for Mortals
Front-End Modernization for Mortals
 
Front end-modernization
Front end-modernizationFront end-modernization
Front end-modernization
 
Front end-modernization
Front end-modernizationFront end-modernization
Front end-modernization
 
Fewd week4 slides
Fewd week4 slidesFewd week4 slides
Fewd week4 slides
 
We continue checking Microsoft projects: analysis of PowerShell
We continue checking Microsoft projects: analysis of PowerShellWe continue checking Microsoft projects: analysis of PowerShell
We continue checking Microsoft projects: analysis of PowerShell
 
Understanding progressive enhancement - yuiconf2010
Understanding progressive enhancement - yuiconf2010Understanding progressive enhancement - yuiconf2010
Understanding progressive enhancement - yuiconf2010
 
Enhance Enhance
Enhance EnhanceEnhance Enhance
Enhance Enhance
 
Selecting the Best Javascript Web Framework
Selecting the Best Javascript Web FrameworkSelecting the Best Javascript Web Framework
Selecting the Best Javascript Web Framework
 
Front-End 개발의 괜찮은 선택 ES6 & React
Front-End 개발의 괜찮은 선택  ES6 & ReactFront-End 개발의 괜찮은 선택  ES6 & React
Front-End 개발의 괜찮은 선택 ES6 & React
 
Frame or not to Frame
Frame or not to FrameFrame or not to Frame
Frame or not to Frame
 

Mais de Charlie

The Problem with School Uniforms and the Possible Fixes
The Problem with School Uniforms and the Possible FixesThe Problem with School Uniforms and the Possible Fixes
The Problem with School Uniforms and the Possible FixesCharlie
 
The Possible Implications of Sky Advertising
The Possible Implications of Sky AdvertisingThe Possible Implications of Sky Advertising
The Possible Implications of Sky AdvertisingCharlie
 
Upcoming Google Maps Feature Immersive View May be Great for Autistic People
Upcoming Google Maps Feature  Immersive View  May be Great for Autistic PeopleUpcoming Google Maps Feature  Immersive View  May be Great for Autistic People
Upcoming Google Maps Feature Immersive View May be Great for Autistic PeopleCharlie
 
Autism and Dealing with Sudden Change
Autism and Dealing with Sudden ChangeAutism and Dealing with Sudden Change
Autism and Dealing with Sudden ChangeCharlie
 
The Government System of Montenegro
The Government System of MontenegroThe Government System of Montenegro
The Government System of MontenegroCharlie
 
Looking into COBOL and Being Serious About it
Looking into COBOL  and Being Serious About itLooking into COBOL  and Being Serious About it
Looking into COBOL and Being Serious About itCharlie
 
5 Useful and Fun Website Links
5 Useful and Fun Website Links5 Useful and Fun Website Links
5 Useful and Fun Website LinksCharlie
 
Lower Grades are not the End of the World
Lower Grades are not the End of the WorldLower Grades are not the End of the World
Lower Grades are not the End of the WorldCharlie
 
Tim Berners-Lee Inventor of the World Wide Web
Tim Berners-Lee  Inventor of the World Wide WebTim Berners-Lee  Inventor of the World Wide Web
Tim Berners-Lee Inventor of the World Wide WebCharlie
 
Double Bill WarGames and Die Hard 40.pdf
Double Bill WarGames and Die Hard 40.pdfDouble Bill WarGames and Die Hard 40.pdf
Double Bill WarGames and Die Hard 40.pdfCharlie
 
The Government System of Mongolia
The Government System of MongoliaThe Government System of Mongolia
The Government System of MongoliaCharlie
 
British Virgin Islands Enquiry Asks for Direct Rule from Britain
British Virgin Islands Enquiry Asks for Direct Rule from BritainBritish Virgin Islands Enquiry Asks for Direct Rule from Britain
British Virgin Islands Enquiry Asks for Direct Rule from BritainCharlie
 
The 2022 UK Local Elections What to Watch
The 2022 UK Local Elections What to WatchThe 2022 UK Local Elections What to Watch
The 2022 UK Local Elections What to WatchCharlie
 
Britains 5 Original National Free-to-Air Television Channels
Britains 5 Original National Free-to-Air Television ChannelsBritains 5 Original National Free-to-Air Television Channels
Britains 5 Original National Free-to-Air Television ChannelsCharlie
 
Unemployment Among People with Autism is a Systemic Problem not an Individual...
Unemployment Among People with Autism is a Systemic Problem not an Individual...Unemployment Among People with Autism is a Systemic Problem not an Individual...
Unemployment Among People with Autism is a Systemic Problem not an Individual...Charlie
 
How I Once Ran a Successful Facebook Page The Rise and Fall
How I Once Ran a Successful Facebook Page  The Rise and FallHow I Once Ran a Successful Facebook Page  The Rise and Fall
How I Once Ran a Successful Facebook Page The Rise and FallCharlie
 
The Weekly Update 1 TV Channel Blog Post Short Blogs and More
The Weekly Update 1  TV Channel Blog Post Short Blogs and MoreThe Weekly Update 1  TV Channel Blog Post Short Blogs and More
The Weekly Update 1 TV Channel Blog Post Short Blogs and MoreCharlie
 
A Look at Dark Items 4 The Binding of Isaac A Lump of Coal and Krampus
A Look at Dark Items 4  The Binding of Isaac  A Lump of Coal and KrampusA Look at Dark Items 4  The Binding of Isaac  A Lump of Coal and Krampus
A Look at Dark Items 4 The Binding of Isaac A Lump of Coal and KrampusCharlie
 
The Government System of Monaco
The Government System of MonacoThe Government System of Monaco
The Government System of MonacoCharlie
 
5 Compelling UFO Cases
5 Compelling UFO Cases5 Compelling UFO Cases
5 Compelling UFO CasesCharlie
 

Mais de Charlie (20)

The Problem with School Uniforms and the Possible Fixes
The Problem with School Uniforms and the Possible FixesThe Problem with School Uniforms and the Possible Fixes
The Problem with School Uniforms and the Possible Fixes
 
The Possible Implications of Sky Advertising
The Possible Implications of Sky AdvertisingThe Possible Implications of Sky Advertising
The Possible Implications of Sky Advertising
 
Upcoming Google Maps Feature Immersive View May be Great for Autistic People
Upcoming Google Maps Feature  Immersive View  May be Great for Autistic PeopleUpcoming Google Maps Feature  Immersive View  May be Great for Autistic People
Upcoming Google Maps Feature Immersive View May be Great for Autistic People
 
Autism and Dealing with Sudden Change
Autism and Dealing with Sudden ChangeAutism and Dealing with Sudden Change
Autism and Dealing with Sudden Change
 
The Government System of Montenegro
The Government System of MontenegroThe Government System of Montenegro
The Government System of Montenegro
 
Looking into COBOL and Being Serious About it
Looking into COBOL  and Being Serious About itLooking into COBOL  and Being Serious About it
Looking into COBOL and Being Serious About it
 
5 Useful and Fun Website Links
5 Useful and Fun Website Links5 Useful and Fun Website Links
5 Useful and Fun Website Links
 
Lower Grades are not the End of the World
Lower Grades are not the End of the WorldLower Grades are not the End of the World
Lower Grades are not the End of the World
 
Tim Berners-Lee Inventor of the World Wide Web
Tim Berners-Lee  Inventor of the World Wide WebTim Berners-Lee  Inventor of the World Wide Web
Tim Berners-Lee Inventor of the World Wide Web
 
Double Bill WarGames and Die Hard 40.pdf
Double Bill WarGames and Die Hard 40.pdfDouble Bill WarGames and Die Hard 40.pdf
Double Bill WarGames and Die Hard 40.pdf
 
The Government System of Mongolia
The Government System of MongoliaThe Government System of Mongolia
The Government System of Mongolia
 
British Virgin Islands Enquiry Asks for Direct Rule from Britain
British Virgin Islands Enquiry Asks for Direct Rule from BritainBritish Virgin Islands Enquiry Asks for Direct Rule from Britain
British Virgin Islands Enquiry Asks for Direct Rule from Britain
 
The 2022 UK Local Elections What to Watch
The 2022 UK Local Elections What to WatchThe 2022 UK Local Elections What to Watch
The 2022 UK Local Elections What to Watch
 
Britains 5 Original National Free-to-Air Television Channels
Britains 5 Original National Free-to-Air Television ChannelsBritains 5 Original National Free-to-Air Television Channels
Britains 5 Original National Free-to-Air Television Channels
 
Unemployment Among People with Autism is a Systemic Problem not an Individual...
Unemployment Among People with Autism is a Systemic Problem not an Individual...Unemployment Among People with Autism is a Systemic Problem not an Individual...
Unemployment Among People with Autism is a Systemic Problem not an Individual...
 
How I Once Ran a Successful Facebook Page The Rise and Fall
How I Once Ran a Successful Facebook Page  The Rise and FallHow I Once Ran a Successful Facebook Page  The Rise and Fall
How I Once Ran a Successful Facebook Page The Rise and Fall
 
The Weekly Update 1 TV Channel Blog Post Short Blogs and More
The Weekly Update 1  TV Channel Blog Post Short Blogs and MoreThe Weekly Update 1  TV Channel Blog Post Short Blogs and More
The Weekly Update 1 TV Channel Blog Post Short Blogs and More
 
A Look at Dark Items 4 The Binding of Isaac A Lump of Coal and Krampus
A Look at Dark Items 4  The Binding of Isaac  A Lump of Coal and KrampusA Look at Dark Items 4  The Binding of Isaac  A Lump of Coal and Krampus
A Look at Dark Items 4 The Binding of Isaac A Lump of Coal and Krampus
 
The Government System of Monaco
The Government System of MonacoThe Government System of Monaco
The Government System of Monaco
 
5 Compelling UFO Cases
5 Compelling UFO Cases5 Compelling UFO Cases
5 Compelling UFO Cases
 

Último

"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 

Último (20)

"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 

7 Simple Things I Learned about JavaScript

  • 1. 1/7 Post author By Charlie September 2, 2022 7 Simple Things I Learned about JavaScript theweeklyrambler.com/7-simple-things-i-learned-about-javascript/ Featured photo: Image by Alltechbuzz_net from Pixabay Hello all. Another weekend is upon us! Hope you all had a great week. Today I thought I’d go over a few little simple but interesting things I learned from JavaScript (so far). I am no expert in the language – yet at least – but I have come across some interesting little facts that I wanted to share. 1. The JavaScript Engine
  • 2. 2/7 Image by Michael Schwarzenberger from Pixabay One of the first things I learned about was the JavaScript Engine and how it is different from one browser to the next. The names of these are important for developers to know so they can keep up to date about the latest JavaScript support for the browsers they use. Some of these include V8 which is used by Google Chrome, Opera and Microsoft Edge. SpiderMonkey used by Firefox. And Chakra used by Internet Explorer… not that this one is really relevant anymore. 2. Languages can Transpile to other Languages
  • 3. 3/7 Image by PopcornSusanN from Pixabay What this means is you can use a different language that may use syntax you prefer to write code in that can then be transpiled into JavaScript so you don’t actually have to write the JavaScript yourself. It also has barely any impact on performance so there is little downside. Such languages that can transpile to JS include… TypeScript which is developed by Microsoft. Flow which is developed by Facebook Inc (or Meta as it is called now). Brython – which transpiles Python code – which is one that sounds most interesting to me as I am interested in also learning Python. 3. The JavaScript Standard
  • 4. 4/7 The gold standard. Image by Steve Bidmead from Pixabay The specification for JavaScript is ECMA-262 which you can read here. It is an in-depth dive into the language and which fully defines it. Although it basically includes anything you may want to know on JS – it is not for quick reference. Instead developer.mozilla is better for that. You can also go to this GitHub page here to see proposals for JS – new features that have not yet reached Stage 4 (where they officially become part of ECMA-262). 4. Best Browsers for JavaScript Development
  • 5. 5/7 Image by Photo Mix from Pixabay Many browsers include their own development tools to support JavaScript development. Such tools can be found by right-clicking and selecting ‘Inspect’ which brings up a console which can be used for debugging among other things. Most developers consider Firefox and Google Chrome to have the best developer tools for JS support. 5. The Script Tag Image by Boskampi from Pixabay
  • 6. 6/7 The Script tag – <script></script> is what is used to insert JS functionality into HTML (a markup language for structuring content on websites). Usually this is done by placing either a .js file or a url that contains the written JS. But you can also write actual JS code within the tag as well (which I did not know beforehand). But it is to be noted this is rarely done since it can get messy if there is too much script (which there normally is a lot). Usually it is better to have it all organised in a file that is linked to the tag either by an absolute path or relative path. Linking to a JS file or URL is also better for page load times – this is because the browser will download it once and then store it in cache – rather than downloading it every time when it is just written directly in the tag. 6. Semicolon Fun Image by fancycrave1 from Pixabay A semicolon is usually placed at the end of a line of JS code so the engine can run the code correctly without errors. But semicolons can be omitted when a line break exists as the engine will add an ‘implicit semicolon’ itself. But it is suggested not to do this as sometimes the engine makes a mistake and doesn’t insert one where it is supposed to go – causing a hard to locate error. As well as that code that has visible semicolons in the right places is also just easier to read and looks nicer.
  • 7. 7/7 7. Strict Mode Strict as a ruler? Image by 2541163 from Pixabay Once upon a time any new updates to JS would merely add new features while leaving older features untouched (some of which later become deprecated – which means don’t use them anymore although you still can if you really want to). Anyway – this meant that compatibility issues were not really a thing in JS. That was until 2009 when ECMAScript5 altered/modified some existing features. But there was an immediate solution to this – Strict Mode. Unless Strict Mode has been explicitly enabled for some code the engine will just treat it as if any alteration/modifications that had been introduced are not there. Enabling Strict Mode is done just by putting “use strict”; above the code you want it to affect, or you can nest it in a function if you only want it to affect that one function. I’ll stop there for now. But I do have more I’ll share in the future. I am looking forward to continuing my JavaScript journey. Thank you for reading this post, if you have any queries please Email me, you can find my Email in the Contacts & Community section. Please also follow The Weekly Rambler on Twitter, Reddit, Pinterest and Facebook which you can access through the buttons at the bottom of this website. You can also use the social media buttons under each blogpost to share with your family, friends and associates.