DEV Community

Cover image for Javascript Tagalog - Arrow Function
mmvergara
mmvergara

Posted on • Edited on

1 1

Javascript Tagalog - Arrow Function

Ano ngaba ang Arrow Function sa Javascript?

Yung arrow function is parang minified version lang kung pano tayo mag define ng function. tignan monalang tong mga pics matamad ako eh.

Standard Arrow Function

Standard Arrow Function

eto yung standard structure ng arrow function, atleast in my interpretation. Parameters naka wrap sila sa parenthesis with the trademark "=>" of the arrow function and the wrap sa {} yung code block.

pwede mo modify yung arrow function in some cases para mas masimplify


1 Expression only

 Expression only javascript tagalog

Pwede monang alisin yung curly braces and return statement if 1 expression lang gagamitin mo para mag return ng value

if may kailangan munang may i execute na ibang code before returning maglagay ka dapat ng {} paramaging accessible yung ';' syntax. Don't forget the 'return' also


1 Parameter only
 Parameters only Tagalog

Pwede monang alisin yung parenthesis para sa parameters if 1 lang yung parameter mo


Callback Function

Very useful sila sa mga Callback function for example.

 Callback function tagalog javascript


"This" Keyword in arrow function

arrow function is this keyword javascript tagalog

hindi nako pupunta sa details and go in-depth pwede ka pumunta sa mdn docs for that. Pero for best practices wag gagamitin ang ARROW FUNCTION sa pag define ng method kasi nag bebehave differently ang 'This' keyword sa arrow function in this case nag popoint ang this keyword ng getAge sa window/Global object actually.


More tagalog Javascript Learning Resources:
https://javascript-methods-in-tagalog.vercel.app/

Image of AssemblyAI tool

Challenge Submission: SpeechCraft - AI-Powered Speech Analysis for Better Communication

SpeechCraft is an advanced real-time speech analytics platform that transforms spoken words into actionable insights. Using cutting-edge AI technology from AssemblyAI, it provides instant transcription while analyzing multiple dimensions of speech performance.

Read full post

Top comments (0)

Heroku

Simplify your DevOps and maximize your time.

Since 2007, Heroku has been the go-to platform for developers as it monitors uptime, performance, and infrastructure concerns, allowing you to focus on writing code.

Learn More

👋 Kindness is contagious

Explore a sea of insights with this enlightening post, highly esteemed within the nurturing DEV Community. Coders of all stripes are invited to participate and contribute to our shared knowledge.

Expressing gratitude with a simple "thank you" can make a big impact. Leave your thanks in the comments!

On DEV, exchanging ideas smooths our way and strengthens our community bonds. Found this useful? A quick note of thanks to the author can mean a lot.

Okay