-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Term Entry] JavaScript Window Function: .resizeTo()
- Loading branch information
1 parent
5c32950
commit 5ec6558
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
content/javascript/concepts/window/terms/resizeTo/resizeTo.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
Title: '.resizeTo()' | ||
Description: 'Resizes the browser window to the width and height specified in pixels.' | ||
Subjects: | ||
- 'Web Development' | ||
- 'Computer Science' | ||
Tags: | ||
- 'Arguments' | ||
- 'Functions' | ||
- 'Parameters' | ||
CatalogContent: | ||
- 'introduction-to-javascript' | ||
- 'paths/front-end-engineer-career-path' | ||
--- | ||
|
||
The **`.resizeTo()`** function in JavaScript modifies the browser window’s dimensions based on the specified width and height values in pixels. | ||
|
||
## Syntax | ||
|
||
```pseudo | ||
window.resizeTo(width, height); | ||
``` | ||
|
||
- `width`: Defines the new width of the window in pixels. | ||
- `height`: Defines the new height of the window in pixels. | ||
|
||
## Example | ||
|
||
The example below demonstrates the use of the `.resizeTo()` function: | ||
|
||
```js | ||
window.resizeTo(450, 300); | ||
``` | ||
|
||
The above example will resize the window to a width of _450_ pixels and height of _300_ pixels. |